2016-03-01 10:47:41 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-12-06 03:09:15 +01:00
|
|
|
# Exit on command errors and treat unset variables as an error
|
|
|
|
set -eu
|
2016-03-01 10:47:41 +01:00
|
|
|
|
2016-12-06 03:09:15 +01:00
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
2016-03-01 10:47:41 +01:00
|
|
|
|
2016-12-06 03:09:15 +01:00
|
|
|
# Source YunoHost helpers
|
|
|
|
source /usr/share/yunohost/helpers
|
2016-03-01 10:47:41 +01:00
|
|
|
|
|
|
|
# Backup sources & data
|
2016-12-06 03:09:15 +01:00
|
|
|
ynh_backup "/var/www/${app}" "sources"
|
|
|
|
|
|
|
|
# Copy NGINX configuration
|
|
|
|
domain=$(ynh_app_setting_get "$app" domain)
|
|
|
|
ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf" "nginx.conf"
|