1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/keeweb_ynh.git synced 2024-09-03 19:26:33 +02:00
keeweb_ynh/scripts/restore

44 lines
1.4 KiB
Text
Raw Normal View History

2016-03-01 10:47:41 +01:00
#!/bin/bash
2018-11-30 14:47:44 +01:00
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
#=================================================
2023-11-02 19:05:09 +01:00
# RESTORE OF THE MAIN DIR OF THE APP
2018-11-30 14:47:44 +01:00
#=================================================
2023-11-02 19:05:09 +01:00
ynh_script_progression --message="Restoring the app main directory..."
2016-03-01 10:47:41 +01:00
2023-11-02 19:05:09 +01:00
ynh_restore_file --origin_path="$install_dir"
2018-11-30 14:47:44 +01:00
2023-11-02 19:05:09 +01:00
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
2018-11-30 14:47:44 +01:00
#=================================================
# RESTORE OF THE NGINX CONFIGURATION
#=================================================
2022-02-04 15:41:24 +01:00
ynh_script_progression --message="Restoring the NGINX configuration..."
2018-11-30 14:47:44 +01:00
2021-02-08 09:32:10 +01:00
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
2018-11-30 14:47:44 +01:00
#=================================================
# GENERIC FINALISATION
#=================================================
# RELOAD NGINX
#=================================================
2021-02-08 09:32:10 +01:00
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..."
2018-11-30 14:47:44 +01:00
2021-02-08 09:32:10 +01:00
ynh_systemd_action --service_name=nginx --action=reload
2021-02-08 09:32:10 +01:00
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Restoration completed for $app" --last