1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/bozon_ynh.git synced 2024-09-03 18:16:09 +02:00
bozon_ynh/scripts/backup
2016-03-25 09:49:10 +01:00

16 lines
456 B
Bash

#! /bin/bash
# causes the shell to exit if any subcommand or pipeline returns a non-zero status
set -e
app=bozon
app_path=/var/www/$app
save_path=$1
# Backup sources & data
sudo cp -R $app_path $save_path
# Copy Nginx and YunoHost parameters to make the script "standalone"
sudo cp -a /etc/yunohost/apps/$app/. save_path/yunohost
domain=$(sudo yunohost app setting $app domain)
sudo cp -a /etc/nginx/conf.d/$domain.d/$app.conf save_path/nginx.conf