1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/my_webapp_ynh.git synced 2024-09-03 19:46:26 +02:00

Handle no PHP in restore script

This commit is contained in:
tituspijean 2022-01-10 22:07:00 +01:00
parent c41eed3af8
commit e9ea6b48a5
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720

View file

@ -45,9 +45,13 @@ test ! -d $final_path \
#=================================================
# REINSTALL DEPENDENCIES
#=================================================
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
#=================================================
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..."
if [ $phpversion != "none" ]
then
ynh_systemd_action --service_name=php${phpversion}-fpm --action=reload
fi
ynh_systemd_action --service_name=nginx --action=reload
#=================================================