41 lines
1.2 KiB
Bash
41 lines
1.2 KiB
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
set -ex
|
||
|
|
||
|
VERSION=1.17.0
|
||
|
|
||
|
wget -O /tmp/freshrss.tar.gz "https://github.com/FreshRSS/FreshRSS/archive/$VERSION.tar.gz"
|
||
|
|
||
|
cd /usr/share
|
||
|
|
||
|
sudo tar -xzvf /tmp/freshrss.tar.gz
|
||
|
sudo mv "FreshRSS-$VERSION" FreshRSS
|
||
|
sudo chown -R :www-data FreshRSS
|
||
|
sudo chmod -R g+r FreshRSS
|
||
|
sudo chmod g+w FreshRSS/data
|
||
|
|
||
|
sudo ln -s /usr/share/FreshRSS/p /var/www/html/
|
||
|
|
||
|
sudo usermod --shell /bin/bash www-data
|
||
|
sudo -i -u www-data bash << EOF
|
||
|
set -ex
|
||
|
cd /usr/share/FreshRSS
|
||
|
./cli/prepare.php
|
||
|
./cli/do-install.php --default_user '$FRESHRSS_USER' \
|
||
|
--base_url https://rss.jeremydormitzer.com \
|
||
|
--api_enabled \
|
||
|
--db-type sqlite \
|
||
|
--db-prefix freshrss
|
||
|
./cli/create-user.php --user '$FRESHRSS_USER' \
|
||
|
--password '$FRESHRSS_PASSWORD' \
|
||
|
--api_password '$FRESHRSS_API_PASSWORD' \
|
||
|
--language en \
|
||
|
--email '$FRESHRSS_EMAIL' \
|
||
|
--token '$FRESHRSS_TOKEN'
|
||
|
./cli/actualize-user.php --user '$FRESHRSS_USER'
|
||
|
EOF
|
||
|
|
||
|
sudo mv /tmp/freshrss.timer /etc/systemd/system/
|
||
|
sudo mv /tmp/freshrss.service /etc/systemd/system/
|
||
|
sudo systemctl enable freshrss.timer
|