|
|
@ -55,13 +55,18 @@ function default_settings() {
|
|
|
|
function update_script() {
|
|
|
|
function update_script() {
|
|
|
|
header_info
|
|
|
|
header_info
|
|
|
|
if [[ ! -f /etc/apache2/sites-available/grocy.conf ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
|
|
|
if [[ ! -f /etc/apache2/sites-available/grocy.conf ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
|
|
|
msg_info "Updating ${APP}"
|
|
|
|
|
|
|
|
php_version=$(php -v | head -n 1 | awk '{print $2}')
|
|
|
|
php_version=$(php -v | head -n 1 | awk '{print $2}')
|
|
|
|
if [[ ! $php_version == "8.3"* ]]; then
|
|
|
|
if [[ ! $php_version == "8.3"* ]]; then
|
|
|
|
|
|
|
|
msg_info "Updating PHP"
|
|
|
|
|
|
|
|
curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg
|
|
|
|
|
|
|
|
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
|
|
|
|
apt-get update
|
|
|
|
apt-get update
|
|
|
|
apt-get install -y php8.3
|
|
|
|
apt-get install -y php8.3 php8.3-cli php8.3-{bz2,curl,mbstring,intl,sqlite3,fpm,gd,zip,xml}
|
|
|
|
update-alternatives --set php /usr/bin/php8.3
|
|
|
|
systemctl reload apache2
|
|
|
|
|
|
|
|
apt autoremove
|
|
|
|
|
|
|
|
msg_ok "Updated PHP"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
msg_info "Updating ${APP}"
|
|
|
|
bash /var/www/html/update.sh
|
|
|
|
bash /var/www/html/update.sh
|
|
|
|
msg_ok "Updated Successfully"
|
|
|
|
msg_ok "Updated Successfully"
|
|
|
|
exit
|
|
|
|
exit
|
|
|
|