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
|
|
|
|
2023-01-08 14:33:31 +01:00
|
|
|
source ../settings/scripts/_common.sh
|
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
|
2023-11-25 19:16:11 +01:00
|
|
|
#REMOVEME? ynh_abort_if_errors
|
2018-05-26 10:27:01 +02:00
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# LOAD SETTINGS
|
|
|
|
#=================================================
|
2023-11-25 19:16:11 +01:00
|
|
|
#REMOVEME? ynh_print_info --message="Loading installation settings..."
|
2016-06-20 23:43:51 +02:00
|
|
|
|
|
|
|
# Retrieve arguments
|
2023-11-25 19:16:11 +01:00
|
|
|
#REMOVEME? app=$YNH_APP_INSTANCE_NAME
|
|
|
|
#REMOVEME? domain=$(ynh_app_setting_get --app=$app --key=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)."
|