1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/teampass_ynh.git synced 2024-09-03 20:26:37 +02:00

Update restore

This commit is contained in:
ericgaspar 2021-07-11 13:22:15 +02:00
parent 32f5f06737
commit aa72e12555

View file

@ -26,6 +26,7 @@ domain=$(ynh_app_setting_get $app domain)
path_url=$(ynh_app_setting_get $app path) path_url=$(ynh_app_setting_get $app path)
final_path=$(ynh_app_setting_get $app final_path) final_path=$(ynh_app_setting_get $app final_path)
db_name=$(ynh_app_setting_get $app db_name) db_name=$(ynh_app_setting_get $app db_name)
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#================================================= #=================================================
# CHECK IF THE APP CAN BE RESTORED # CHECK IF THE APP CAN BE RESTORED
@ -83,8 +84,8 @@ chown -R $app $final_path/{includes,files,upload}
# RESTORE OF THE PHP-FPM CONFIGURATION # RESTORE OF THE PHP-FPM CONFIGURATION
#================================================= #=================================================
ynh_restore_file "/etc/php5/fpm/pool.d/$app.conf" ynh_restore_file "/etc/php$phpversion/fpm/pool.d/$app.conf"
ynh_restore_file "/etc/php5/fpm/conf.d/20-$app.ini" ynh_restore_file "/etc/php$phpversion/fpm/conf.d/20-$app.ini"
#================================================= #=================================================
# SPECIFIC RESTORE # SPECIFIC RESTORE
@ -99,16 +100,17 @@ chown -R $app "/etc/$app/sk.php"
# RESTORE CRON FILE # RESTORE CRON FILE
#================================================= #=================================================
ynh_restore_file "/etc/cron.d/$app" ynh_restore_file --origin_path="/etc/cron.d/$app"
#================================================= #=================================================
# GENERIC FINALISATION # GENERIC FINALISATION
#================================================= #=================================================
# RELOAD NGINX AND PHP-FPM # RELOAD NGINX AND PHP-FPM
#================================================= #=================================================
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=1
ynh_system_reload --service_name=php5-fpm ynh_systemd_action --service_name=php$phpversion-fpm --action=reload
ynh_system_reload --service_name=nginx ynh_systemd_action --service_name=nginx --action=reload
#================================================= #=================================================
# DEACTIVE MAINTENANCE MODE # DEACTIVE MAINTENANCE MODE