#!/bin/bash # Exit on command errors and treat access to unset variables as an error set -eu # Source YNH helpers . /usr/share/yunohost/helpers app=$YNH_APP_INSTANCE_NAME # Retrieve arguments domain=$(ynh_app_setting_get "$app" domain) path=$(ynh_app_setting_get "$app" path) is_public=$(ynh_app_setting_get "$app" is_public) # Copy the app source files ynh_backup "/var/www/$app" "www" # Copy the conf files ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf" "conf/nginx.conf"