@@ -17,23 +17,10 @@ msg_info "Installing Dependencies"
1717$STD apt-get install -y apt-transport-https
1818msg_ok " Installed Dependencies"
1919
20- msg_info " Installing PHP8.2"
21- VERSION=" $( awk -F' =' ' /^VERSION_CODENAME=/{ print $NF }' /etc/os-release) "
22- curl -fsSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg
23- echo -e " deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $VERSION main" > /etc/apt/sources.list.d/php.list
24- $STD apt-get update
25- $STD apt-get install -y php8.2
26- $STD apt-get install -y libapache2-mod-php8.2
27- $STD apt-get install -y php8.2-sqlite3
28- $STD apt-get install -y php8.2-gd
29- $STD apt-get install -y php8.2-intl
30- $STD apt-get install -y php8.2-mbstring
31- msg_ok " Installed PHP8.2"
20+ PHP_VERSION=" 8.3" PHP_MODULE=" sqlite3,bz2" PHP_APACHE=" yes" setup_php
21+ fetch_and_deploy_gh_release " grocy" " grocy/grocy" " prebuild" " latest" " /var/www/html" " grocy*.zip"
3222
33- msg_info " Installing grocy"
34- latest=$( curl -fsSL https://api.github.com/repos/grocy/grocy/releases/latest | grep " tag_name" | awk ' {print substr($2, 3, length($2)-4) }' )
35- curl -fsSL " https://github.com/grocy/grocy/releases/download/v${latest} /grocy_${latest} .zip" -o " grocy_${latest} .zip"
36- $STD unzip grocy_${latest} .zip -d /var/www/html
23+ msg_info " Configuring grocy"
3724chown -R www-data:www-data /var/www/html
3825cp /var/www/html/config-dist.php /var/www/html/data/config.php
3926chmod +x /var/www/html/update.sh
@@ -64,5 +51,4 @@ customize
6451msg_info " Cleaning up"
6552$STD apt-get -y autoremove
6653$STD apt-get -y autoclean
67- rm -rf /root/grocy_${latest} .zip
6854msg_ok " Cleaned"
0 commit comments