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:
parent
c41eed3af8
commit
e9ea6b48a5
1 changed files with 15 additions and 4 deletions
|
@ -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
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue