Skip to content

Commit 475c666

Browse files
authored
Refactor: FreshRSS (#5847)
* Refactor * Update freshrss-install.sh
1 parent 8d41961 commit 475c666

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

install/freshrss-install.sh

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,7 @@ setting_up_container
1313
network_check
1414
update_os
1515

16-
msg_info "Installing Dependencies"
17-
$STD apt-get install -y \
18-
apache2 \
19-
php-{curl,dom,json,ctype,pgsql,gmp,mbstring,iconv,zip} \
20-
libapache2-mod-php
21-
msg_ok "Installed Dependencies"
22-
16+
PHP_VERSION="8.2" PHP_MODULE="dom,json,ctype,pgsql,gmp,iconv" PHP_APACHE="YES" setup_php
2317
PG_VERSION="16" setup_postgresql
2418

2519
msg_info "Setting up PostgreSQL"
@@ -36,17 +30,14 @@ $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMP
3630
} >>~/freshrss.creds
3731
msg_ok "Set up PostgreSQL"
3832

39-
msg_info "Installing FreshRSS"
40-
RELEASE=$(curl -fsSL https://api.github.com/repos/FreshRSS/FreshRSS/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
41-
cd /opt
42-
curl -fsSL "https://github.com/FreshRSS/FreshRSS/archive/refs/tags/${RELEASE}.zip" -o "${RELEASE}.zip"
43-
$STD unzip "${RELEASE}.zip"
44-
mv "/opt/FreshRSS-${RELEASE}" /opt/freshrss
33+
fetch_and_deploy_gh_release "freshrss" "FreshRSS/FreshRSS"
34+
35+
msg_info "Configuring FreshRSS"
4536
cd /opt/freshrss
4637
chown -R www-data:www-data /opt/freshrss
4738
chmod -R g+rX /opt/freshrss
4839
chmod -R g+w /opt/freshrss/data/
49-
msg_ok "Installed FreshRSS"
40+
msg_ok "Configured FreshRSS"
5041

5142
msg_info "Setting up cron job for feed refresh"
5243
cat <<EOF >/etc/cron.d/freshrss-actualize
@@ -83,7 +74,6 @@ motd_ssh
8374
customize
8475

8576
msg_info "Cleaning up"
86-
rm -rf "/opt/${RELEASE}.zip"
8777
$STD apt-get -y autoremove
8878
$STD apt-get -y autoclean
8979
msg_ok "Cleaned"

0 commit comments

Comments
 (0)