From c89da774a6da06a4d9afbff327d18764205b1c0a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 1 Oct 2021 22:13:04 +0200 Subject: [PATCH] Fix --- scripts/backup | 4 ++-- scripts/restore | 6 +++--- scripts/upgrade | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/backup b/scripts/backup index 75e9f52..7683783 100644 --- a/scripts/backup +++ b/scripts/backup @@ -28,7 +28,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) db_name=$(ynh_app_setting_get --app=$app --key=db_name) with_mysql=$(ynh_app_setting_get --app=$app --key=with_mysql) with_sftp=$(ynh_app_setting_get --app=$app --key=with_sftp) -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +php_custom=$(ynh_app_setting_get --app=$app --key=php_custom) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP @@ -51,7 +51,7 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" # BACKUP THE PHP-FPM CONFIGURATION #================================================= -ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" +ynh_backup --src_path="/etc/php/$php_custom/fpm/pool.d/$app.conf" #================================================= # BACKUP THE MYSQL DATABASE diff --git a/scripts/restore b/scripts/restore index e903d5d..3dfae49 100644 --- a/scripts/restore +++ b/scripts/restore @@ -30,7 +30,7 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name) with_mysql=$(ynh_app_setting_get --app=$app --key=with_mysql) with_sftp=$(ynh_app_setting_get --app=$app --key=with_sftp) password=$(ynh_app_setting_get --app=$app --key=password) -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +php_custom=$(ynh_app_setting_get --app=$app --key=php_custom) #================================================= # CHECK IF THE APP CAN BE RESTORED @@ -100,7 +100,7 @@ chmod o-rwx "$final_path" # RESTORE THE PHP-FPM CONFIGURATION #================================================= -ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" +ynh_restore_file --origin_path="/etc/php/${php_custom}/fpm/pool.d/$app.conf" #================================================= # SPECIFIC RESTORATION @@ -113,7 +113,7 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" #================================================= ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." -ynh_systemd_action --service_name=php$phpversion-fpm --action=reload +ynh_systemd_action --service_name=php${php_custom}-fpm --action=reload ynh_systemd_action --service_name=nginx --action=reload #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 26b62fb..82549be 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -160,7 +160,7 @@ usermod -g "$app" "$app" ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$YNH_PHP_VERSION +ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$php_custom #================================================= # SPECIFIC UPGRADE