1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/phpinfo_ynh.git synced 2024-09-03 19:56:23 +02:00

Fix backup and restore

This commit is contained in:
yalh76 2021-03-12 03:14:34 +01:00
parent 2de4d810f4
commit 0bd72574ee
2 changed files with 5 additions and 3 deletions

View file

@ -28,6 +28,7 @@ app=$YNH_APP_INSTANCE_NAME
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
domain=$(ynh_app_setting_get --app=$app --key=domain)
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
ynh_use_php
#=================================================
# DECLARE DATA AND CONF FILES TO BACKUP
@ -50,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="$php_version_path/$php_version/etc/php-fpm.d/$app.conf"
#=================================================
# END OF SCRIPT

View file

@ -81,13 +81,14 @@ ynh_script_progression --message="Reinstalling dependencies..."
# Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies
ynh_install_php --php_version=$php_version
ynh_use_php
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring PHP-FPM configuration..."
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
ynh_restore_file --origin_path="$php_version_path/$php_version/etc/php-fpm.d/$app.conf"
#=================================================
# GENERIC FINALIZATION
@ -96,7 +97,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_version-fpm --action=reload
ynh_systemd_action --service_name=nginx --action=reload
#=================================================