From 28e4b5d50e98ad1f672857498d49d263c33d201e Mon Sep 17 00:00:00 2001 From: Kayou Date: Mon, 4 May 2020 10:51:14 +0200 Subject: [PATCH] fix restore php fpm on fresh install --- scripts/restore | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/scripts/restore b/scripts/restore index 14b9c2a..933c5a1 100755 --- a/scripts/restore +++ b/scripts/restore @@ -73,13 +73,6 @@ ynh_system_user_create --username=$app # Restore permissions on app files chown -R $app: $final_path -#================================================= -# RESTORE THE PHP-FPM CONFIGURATION -#================================================= - -ynh_restore_file --origin_path="/etc/php/${YNH_PHP_VERSION}/fpm/pool.d/$app.conf" - - #================================================= # SPECIFIC RESTORATION #================================================= @@ -90,6 +83,16 @@ ynh_script_progression --message="Reinstalling dependencies..." --time --weight= # Define and install dependencies ynh_install_app_dependencies $pkg_dependencies +#================================================= +# RESTORE THE PHP-FPM CONFIGURATION +#================================================= +ynh_script_progression --message="Reconfiguring php-fpm..." --time --weight=1 + +# Restore the file first, so it can have a backup if different +ynh_restore_file --origin_path="/etc/php/$YNH_PHP_VERSION/fpm/pool.d/$app.conf" + +ynh_add_fpm_config --usage=low --footprint=low --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies" + #================================================= # RESTORE THE MYSQL DATABASE #=================================================