1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/my_webapp_ynh.git synced 2024-09-03 19:46:26 +02:00
This commit is contained in:
ericgaspar 2021-10-01 22:13:04 +02:00
parent 38712bb719
commit c89da774a6
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 6 additions and 6 deletions

View file

@ -28,7 +28,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
with_mysql=$(ynh_app_setting_get --app=$app --key=with_mysql)
with_sftp=$(ynh_app_setting_get --app=$app --key=with_sftp)
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
php_custom=$(ynh_app_setting_get --app=$app --key=php_custom)
#=================================================
# DECLARE DATA AND CONF FILES TO BACKUP
@ -51,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="/etc/php/$php_custom/fpm/pool.d/$app.conf"
#=================================================
# BACKUP THE MYSQL DATABASE

View file

@ -30,7 +30,7 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
with_mysql=$(ynh_app_setting_get --app=$app --key=with_mysql)
with_sftp=$(ynh_app_setting_get --app=$app --key=with_sftp)
password=$(ynh_app_setting_get --app=$app --key=password)
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
php_custom=$(ynh_app_setting_get --app=$app --key=php_custom)
#=================================================
# CHECK IF THE APP CAN BE RESTORED
@ -100,7 +100,7 @@ chmod o-rwx "$final_path"
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
ynh_restore_file --origin_path="/etc/php/${php_custom}/fpm/pool.d/$app.conf"
#=================================================
# SPECIFIC RESTORATION
@ -113,7 +113,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_custom}-fpm --action=reload
ynh_systemd_action --service_name=nginx --action=reload
#=================================================

View file

@ -160,7 +160,7 @@ usermod -g "$app" "$app"
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$YNH_PHP_VERSION
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$php_custom
#=================================================
# SPECIFIC UPGRADE