1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wemawema_ynh.git synced 2024-10-01 13:34:56 +02:00
wemawema_ynh/scripts/restore

45 lines
1.4 KiB
Text
Raw Normal View History

2017-10-28 19:28:51 +02:00
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source ../settings/scripts/_common.sh
2017-10-28 19:28:51 +02:00
source /usr/share/yunohost/helpers
#=================================================
# STANDARD RESTORATION STEPS
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
ynh_script_progression --message="Restoring the app main directory..." --weight=3
2017-10-28 19:28:51 +02:00
2023-05-07 18:50:05 +02:00
ynh_restore_file --origin_path="$install_dir"
2017-10-28 19:28:51 +02:00
# Restore permissions on app files
2023-05-07 18:50:05 +02:00
chmod 750 $install_dir
chown -R www-data: $install_dir
2017-10-28 19:28:51 +02:00
#=================================================
# GENERIC FINALIZATION
#=================================================
# RELOAD NGINX
#=================================================
2020-11-17 09:08:16 +01:00
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
ynh_systemd_action --service_name=nginx --action=reload
#=================================================
# END OF SCRIPT
#=================================================
2017-10-28 19:28:51 +02:00
ynh_script_progression --message="Restoration completed for $app" --last