1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/alltube_ynh.git synced 2024-09-03 18:06:12 +02:00

fix error with php version

This commit is contained in:
Clément 2020-04-12 22:05:32 +02:00
parent 0c8c8a81ff
commit a01c85a82c

View file

@ -10,6 +10,16 @@
source ../settings/scripts/_common.sh source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
current_version=$(yunohost app info alltube | grep version | cut -d ':' -f 2)
current_version=${current_version/ /''}
if [ "2.2.1~ynh1" != "`echo -e "2.2.1~ynh1\n$current_version" | sort -V | head -n1`" ]; then
CURRENT_PHP_VERSION="7.0"
else
CURRENT_PHP_VERSION="7.3"
fi
#================================================= #=================================================
# MANAGE SCRIPT FAILURE # MANAGE SCRIPT FAILURE
#================================================= #=================================================
@ -49,7 +59,7 @@ ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
#================================================= #=================================================
ynh_print_info "Backing up php-fpm configuration..." ynh_print_info "Backing up php-fpm configuration..."
ynh_backup "/etc/php/7.0/fpm/pool.d/$app.conf" ynh_backup "/etc/php/$CURRENT_PHP_VERSION/fpm/pool.d/$app.conf"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT