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:
parent
bf07b56afe
commit
d04c644d62
1 changed files with 21 additions and 0 deletions
21
scripts/backup
Normal file
21
scripts/backup
Normal 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"
|
Loading…
Add table
Reference in a new issue