#! /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