#! /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 data_path=/home/yunohost.app/$app save_path=$1 # Backup sources & data sudo mkdir -p $save_path/data sudo cp -R $app_path $save_path sudo cp -R $data_path $save_path/data # 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