1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/scrumblr_ynh.git synced 2024-09-03 20:16:29 +02:00

Create backup

This commit is contained in:
frju365 2017-02-11 20:09:17 +01:00 committed by GitHub
parent bf07b56afe
commit d04c644d62

21
scripts/backup Normal file
View file

@ -0,0 +1,21 @@
#!/bin/bash
# Exit on command errors and treat unset variables as an error
set -eu
# Load common variables and functions
source ./_common.sh
domain=$(ynh_app_setting_get "$app" domain)
# Copy the app source and data files
ynh_backup "$DESTDIR" "www"
ynh_backup "$DATA_PATH" "data"
# Copy the conf files
mkdir ./conf
ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf" "conf/nginx.conf"
ynh_backup "/etc/systemd/system/${app}.service" "conf/systemd.service"
# Copy NGINX configuration
ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf" "nginx.conf"