@@ -14,17 +14,14 @@ network_check
1414update_os
1515
1616msg_info " Installing Dependencies"
17- curl -fsSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg
18- echo " deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ bookworm main" > /etc/apt/sources.list.d/php.list
19- $STD apt-get update
20- $STD apt-get install -y \
21- apache2 \
22- libapache2-mod-php8.4 \
23- php8.4-{bcmath,cli,intl,curl,zip,gd,xml,mbstring,mysql} \
24- composer
17+ $STD apt-get install -y apache2
2518msg_ok " Installed Dependencies"
2619
20+ PHP_VERSION=" 8.4" PHP_APACHE=" YES" PHP_MODULE=" mysql" setup_php
21+ setup_composer
2722setup_mariadb
23+ fetch_and_deploy_gh_release " firefly" " firefly-iii/firefly-iii"
24+ LOCAL_IP=$( hostname -I | awk ' {print $1}' )
2825
2926msg_info " Setting up database"
3027DB_NAME=firefly
@@ -41,13 +38,7 @@ mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRI
4138} >> ~/firefly.creds
4239msg_ok " Set up database"
4340
44- msg_info " Installing Firefly III (Patience)"
45- LOCAL_IP=$( hostname -I | awk ' {print $1}' )
46- RELEASE=$( curl -fsSL https://api.github.com/repos/firefly-iii/firefly-iii/releases/latest | grep " tag_name" | awk ' {print substr($2, 3, length($2)-4)}' )
47- cd /opt
48- curl -fsSL " https://github.com/firefly-iii/firefly-iii/releases/download/v${RELEASE} /FireflyIII-v${RELEASE} .tar.gz" -o " FireflyIII-v${RELEASE} .tar.gz"
49- mkdir -p /opt/firefly
50- tar -xzf FireflyIII-v${RELEASE} .tar.gz -C /opt/firefly
41+ msg_info " Configuring Firefly III (Patience)"
5142chown -R www-data:www-data /opt/firefly
5243chmod -R 775 /opt/firefly/storage
5344cd /opt/firefly
@@ -69,8 +60,7 @@ tar -xzf "DataImporter-v${IMPORTER_RELEASE}.tar.gz" -C /opt/firefly/dataimporter
6960cp /opt/firefly/dataimporter/.env.example /opt/firefly/dataimporter/.env
7061sed -i " s#FIREFLY_III_URL=#FIREFLY_III_URL=http://${LOCAL_IP} #g" /opt/firefly/dataimporter/.env
7162chown -R www-data:www-data /opt/firefly
72- echo " ${RELEASE} " > " /opt/${APPLICATION} _version.txt"
73- msg_ok " Installed Firefly III"
63+ msg_ok " Configured Firefly III"
7464
7565msg_info " Creating Service"
7666cat << EOF >/etc/apache2/sites-available/firefly.conf
@@ -112,7 +102,6 @@ motd_ssh
112102customize
113103
114104msg_info " Cleaning up"
115- rm -rf " /opt/FireflyIII-v${RELEASE} .tar.gz"
116105rm -rf " /opt/DataImporter-v${IMPORTER_RELEASE} .tar.gz"
117106$STD apt-get -y autoremove
118107$STD apt-get -y autoclean
0 commit comments