reverseproxy_ynh/scripts/backup

39 lines
1.2 KiB
Text
Raw Normal View History

2016-06-20 23:43:51 +02:00
#!/bin/bash
2018-05-26 10:27:01 +02:00
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
2016-06-20 23:43:51 +02:00
2018-05-26 10:27:01 +02:00
source /usr/share/yunohost/helpers
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# LOAD SETTINGS
#=================================================
2021-01-23 15:21:17 +01:00
ynh_print_info --message="Loading installation settings..."
2016-06-20 23:43:51 +02:00
# Retrieve arguments
2019-05-15 18:42:44 +02:00
app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain)
2016-06-20 23:43:51 +02:00
2021-01-23 15:21:17 +01:00
#=================================================
# BACKUP THE NGINX CONFIGURATION
#=================================================
2016-06-20 23:43:51 +02:00
# Copy the conf files
2019-05-15 18:42:44 +02:00
ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf"
2021-01-23 15:21:17 +01:00
#=================================================
# END OF SCRIPT
#=================================================
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."