Refactor: FreshRSS (#5847)

* Refactor

* Update freshrss-install.sh
This commit is contained in:
Slaviša Arežina 2025-07-09 11:36:03 +02:00 committed by GitHub
parent 8d419616a6
commit 475c666eb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,13 +13,7 @@ setting_up_container
network_check network_check
update_os update_os
msg_info "Installing Dependencies" PHP_VERSION="8.2" PHP_MODULE="dom,json,ctype,pgsql,gmp,iconv" PHP_APACHE="YES" setup_php
$STD apt-get install -y \
apache2 \
php-{curl,dom,json,ctype,pgsql,gmp,mbstring,iconv,zip} \
libapache2-mod-php
msg_ok "Installed Dependencies"
PG_VERSION="16" setup_postgresql PG_VERSION="16" setup_postgresql
msg_info "Setting up PostgreSQL" msg_info "Setting up PostgreSQL"
@ -36,17 +30,14 @@ $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMP
} >>~/freshrss.creds } >>~/freshrss.creds
msg_ok "Set up PostgreSQL" msg_ok "Set up PostgreSQL"
msg_info "Installing FreshRSS" fetch_and_deploy_gh_release "freshrss" "FreshRSS/FreshRSS"
RELEASE=$(curl -fsSL https://api.github.com/repos/FreshRSS/FreshRSS/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
cd /opt msg_info "Configuring FreshRSS"
curl -fsSL "https://github.com/FreshRSS/FreshRSS/archive/refs/tags/${RELEASE}.zip" -o "${RELEASE}.zip"
$STD unzip "${RELEASE}.zip"
mv "/opt/FreshRSS-${RELEASE}" /opt/freshrss
cd /opt/freshrss cd /opt/freshrss
chown -R www-data:www-data /opt/freshrss chown -R www-data:www-data /opt/freshrss
chmod -R g+rX /opt/freshrss chmod -R g+rX /opt/freshrss
chmod -R g+w /opt/freshrss/data/ chmod -R g+w /opt/freshrss/data/
msg_ok "Installed FreshRSS" msg_ok "Configured FreshRSS"
msg_info "Setting up cron job for feed refresh" msg_info "Setting up cron job for feed refresh"
cat <<EOF >/etc/cron.d/freshrss-actualize cat <<EOF >/etc/cron.d/freshrss-actualize
@ -83,7 +74,6 @@ motd_ssh
customize customize
msg_info "Cleaning up" msg_info "Cleaning up"
rm -rf "/opt/${RELEASE}.zip"
$STD apt-get -y autoremove $STD apt-get -y autoremove
$STD apt-get -y autoclean $STD apt-get -y autoclean
msg_ok "Cleaned" msg_ok "Cleaned"