diff --git a/scripts/restore b/scripts/restore index 0062b46..b0629dd 100644 --- a/scripts/restore +++ b/scripts/restore @@ -45,9 +45,13 @@ test ! -d $final_path \ #================================================= # REINSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Reinstalling dependencies..." --weight=2 -ynh_install_app_dependencies "php${phpversion}-fpm" +if [ $phpversion != "none" ] +then + ynh_script_progression --message="Reinstalling dependencies..." --weight=2 + + ynh_install_app_dependencies "php${phpversion}-fpm" +fi #================================================= # RESTORE THE NGINX CONFIGURATION @@ -107,7 +111,10 @@ chmod o-rwx "$final_path" # RESTORE THE PHP-FPM CONFIGURATION #================================================= -ynh_restore_file --origin_path="/etc/php/${phpversion}/fpm/pool.d/$app.conf" +if [ $phpversion != "none" ] +then + ynh_restore_file --origin_path="/etc/php/${phpversion}/fpm/pool.d/$app.conf" +fi #================================================= # SPECIFIC RESTORATION @@ -120,7 +127,11 @@ 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 +if [ $phpversion != "none" ] +then + ynh_systemd_action --service_name=php${phpversion}-fpm --action=reload +fi + ynh_systemd_action --service_name=nginx --action=reload #=================================================