2017-06-02 17:15:57 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-03-03 18:12:41 +01:00
|
|
|
source ../settings/scripts/_common.sh
|
|
|
|
source /usr/share/yunohost/helpers
|
2017-06-02 17:15:57 +02:00
|
|
|
|
2017-08-26 03:24:41 +02:00
|
|
|
#=================================================
|
2021-03-22 19:33:07 +01:00
|
|
|
# RESTORE THE APP MAIN DIR
|
2017-08-26 03:24:41 +02:00
|
|
|
#=================================================
|
2024-07-18 16:56:29 +02:00
|
|
|
ynh_script_progression "Restoring $app main directory..."
|
2017-06-02 17:15:57 +02:00
|
|
|
|
2024-07-18 16:56:29 +02:00
|
|
|
ynh_restore "$install_dir"
|
2021-03-22 19:33:07 +01:00
|
|
|
|
2017-08-26 03:24:41 +02:00
|
|
|
#=================================================
|
2023-09-15 13:46:10 +02:00
|
|
|
# RESTORE THE MYSQL DATABASE
|
2017-08-26 03:24:41 +02:00
|
|
|
#=================================================
|
2024-07-18 16:56:29 +02:00
|
|
|
ynh_script_progression "Restoring the MySQL database..."
|
2021-12-27 17:10:09 +01:00
|
|
|
|
2024-07-18 16:56:29 +02:00
|
|
|
ynh_mysql_db_shell < ./db.sql
|
2020-09-27 22:39:12 +02:00
|
|
|
|
2021-11-14 19:51:40 +01:00
|
|
|
#=================================================
|
2024-08-31 15:22:18 +02:00
|
|
|
# RESTORE SYSTEM CONFIGURATIONS
|
2021-11-14 19:51:40 +01:00
|
|
|
#=================================================
|
2024-08-31 15:22:18 +02:00
|
|
|
ynh_script_progression "Restoring system configurations related to $app..."
|
2017-06-02 17:15:57 +02:00
|
|
|
|
2024-07-18 16:56:29 +02:00
|
|
|
ynh_restore "/etc/php/$php_version/fpm/pool.d/$app.conf"
|
2019-03-03 18:12:41 +01:00
|
|
|
|
2024-07-18 16:56:29 +02:00
|
|
|
ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf"
|
2019-03-03 18:12:41 +01:00
|
|
|
|
2017-08-26 03:24:41 +02:00
|
|
|
#=================================================
|
|
|
|
# RELOAD NGINX AND PHP-FPM
|
|
|
|
#=================================================
|
2024-07-18 16:56:29 +02:00
|
|
|
ynh_script_progression "Reloading NGINX web server and PHP-FPM..."
|
2017-06-02 17:15:57 +02:00
|
|
|
|
2024-07-18 16:56:29 +02:00
|
|
|
ynh_systemctl --service=php${php_version}-fpm --action=reload
|
|
|
|
ynh_systemctl --service=nginx --action=reload
|
2019-03-03 18:12:41 +01:00
|
|
|
|
2019-03-03 18:13:57 +01:00
|
|
|
#=================================================
|
|
|
|
# END OF SCRIPT
|
|
|
|
#=================================================
|
|
|
|
|
2024-07-18 16:56:29 +02:00
|
|
|
ynh_script_progression "Restoration completed for $app"
|