1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/grav_ynh.git synced 2024-09-03 19:16:01 +02:00
grav_ynh/scripts/backup

52 lines
1.5 KiB
Text
Raw Normal View History

2017-03-02 15:44:54 +01:00
#!/bin/bash
2018-08-10 00:06:26 +02:00
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
2017-03-02 15:44:54 +01:00
2018-08-10 00:06:26 +02:00
source ../settings/scripts/_common.sh
2017-03-02 15:44:54 +01:00
source /usr/share/yunohost/helpers
2018-08-10 00:06:26 +02:00
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================
ynh_clean_setup () {
### Remove this function if there's nothing to clean before calling the remove script.
true
}
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# LOAD SETTINGS
#=================================================
2017-03-29 19:25:52 +02:00
app=$YNH_APP_INSTANCE_NAME
2018-08-10 00:06:26 +02:00
final_path=$(ynh_app_setting_get $app final_path)
domain=$(ynh_app_setting_get $app domain)
#=================================================
# STANDARD BACKUP STEPS
#=================================================
# BACKUP THE APP MAIN DIR
#=================================================
ynh_backup "$final_path"
#=================================================
# BACKUP THE NGINX CONFIGURATION
#=================================================
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
2017-03-02 15:44:54 +01:00
2018-08-10 00:06:26 +02:00
#=================================================
# BACKUP THE PHP-FPM CONFIGURATION
#=================================================
2017-03-09 17:27:59 +01:00
2018-08-10 00:06:26 +02:00
ynh_backup "/etc/php5/fpm/pool.d/$app.conf"
ynh_backup "/etc/php5/fpm/conf.d/20-$app.ini"