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

40 lines
1.1 KiB
Text
Raw Normal View History

#!/bin/bash
2017-08-28 16:34:15 +02:00
#=================================================
# GENERIC START
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================
# Exit on command errors and treat access to unset variables as an error
2017-04-20 19:34:26 +02:00
set -eu
2017-08-28 16:34:15 +02:00
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source /usr/share/yunohost/helpers
#=================================================
# LOAD SETTINGS
#=================================================
2016-05-07 02:00:48 +02:00
2017-04-20 19:34:26 +02:00
app=$YNH_APP_INSTANCE_NAME
2016-05-07 02:00:48 +02:00
2017-08-28 16:34:15 +02:00
domain=$(ynh_app_setting_get $app domain)
#=================================================
# STANDARD BACKUP STEPS
#=================================================
# BACKUP THE APP MAIN DIR
#=================================================
ynh_backup "/etc/shellinabox"
ynh_backup "/etc/default/shellinabox"
2017-08-28 16:34:15 +02:00
#=================================================
# BACKUP THE NGINX CONFIGURATION
#=================================================
2017-08-28 16:34:15 +02:00
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"