From 0c8c8a81ff16b2dcca3167a45f2a3eefab2454a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment?= Date: Sun, 12 Apr 2020 16:46:11 +0200 Subject: [PATCH] handle php 7.3 in restore script --- scripts/restore | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/restore b/scripts/restore index a30d57c..537de38 100755 --- a/scripts/restore +++ b/scripts/restore @@ -9,6 +9,8 @@ #Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers +source ../settings/scripts/ynh_add_extra_apt_repos +source ../settings/scripts/ynh_install_php #================================================= # MANAGE SCRIPT FAILURE @@ -67,12 +69,13 @@ ynh_system_user_create $app # Restore permissions on app files chown -R root: $final_path +chown -R alltube: $final_path/templates_c/ #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= -ynh_restore_file "/etc/php/7.0/fpm/pool.d/$app.conf" +ynh_restore_file --origin_path="/etc/php/$YNH_PHP_VERSION/fpm/pool.d/$app.conf" #================================================= # SPECIFIC RESTORATION @@ -83,6 +86,7 @@ ynh_print_info "Reinstalling dependencies..." # Define and install dependencies ynh_install_app_dependencies $pkg_dependencies +ynh_install_php --phpversion="$YNH_PHP_VERSION" --package="$extra_pkg_dependencies" #================================================= # GENERIC FINALIZATION @@ -91,7 +95,7 @@ ynh_install_app_dependencies $pkg_dependencies #================================================= ynh_print_info "Reloading nginx web server and php-fpm..." -systemctl reload php7.0-fpm +systemctl reload php7.3-fpm systemctl reload nginx #=================================================