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:
parent
0a6591826a
commit
f850053048
2 changed files with 11 additions and 2 deletions
|
@ -1,5 +1,11 @@
|
||||||
#!/bin/bash
|
#!/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=${!#}
|
app=${!#}
|
||||||
|
|
||||||
# Retrieve arguments
|
# Retrieve arguments
|
||||||
|
@ -9,7 +15,7 @@ backup_dir=$1
|
||||||
domain=$(sudo yunohost app setting "$app" domain)
|
domain=$(sudo yunohost app setting "$app" domain)
|
||||||
|
|
||||||
# Save sources & data
|
# Save sources & data
|
||||||
sudo cp -a "/var/www/${app}" ./sources
|
ynh_backup "/var/www/${app}" "sources"
|
||||||
|
|
||||||
# Copy NGINX configuration
|
# 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"
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# causes the shell to exit if any subcommand or pipeline returns a non-zero status
|
||||||
|
set -e
|
||||||
|
|
||||||
app=${!#}
|
app=${!#}
|
||||||
|
|
||||||
# Retrieve arguments
|
# Retrieve arguments
|
||||||
|
|
Loading…
Reference in a new issue