1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jappix_ynh.git synced 2024-09-03 19:26:19 +02:00

[enh] Use latest backup specification.

This commit is contained in:
opi 2016-05-07 01:44:03 +02:00
parent 0a6591826a
commit f850053048
2 changed files with 11 additions and 2 deletions

View file

@ -1,5 +1,11 @@
#!/bin/bash
# causes the shell to exit if any subcommand or pipeline returns a non-zero status
set -e
# Source YNH helpers
. /usr/share/yunohost/helpers
app=${!#}
# Retrieve arguments
@ -9,7 +15,7 @@ backup_dir=$1
domain=$(sudo yunohost app setting "$app" domain)
# Save sources & data
sudo cp -a "/var/www/${app}" ./sources
ynh_backup "/var/www/${app}" "sources"
# Copy NGINX configuration
sudo cp -a "/etc/nginx/conf.d/${domain}.d/${app}.conf" ./nginx.conf
ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf" "nginx.conf"

View file

@ -1,5 +1,8 @@
#!/bin/bash
# causes the shell to exit if any subcommand or pipeline returns a non-zero status
set -e
app=${!#}
# Retrieve arguments