#!/bin/bash #================================================= # GENERIC START #================================================= # Source YunoHost helpers source /usr/share/yunohost/helpers # Stop script if errors ynh_abort_if_errors # Import common cmd source ../settings/scripts/experimental_helper.sh source ../settings/scripts/_common.sh # Retrieve arguments ynh_script_progression --message="Loading installation settings..." domain=$(ynh_app_setting_get --app $app --key domain) #================================================= # STANDARD BACKUP STEPS #================================================= # Copy NGINX configuration ynh_script_progression --message="Backing up configuration..." domain=$(ynh_app_setting_get --app $app --key domain) ynh_backup --src_path "/etc/nginx/conf.d/${domain}.d/${app}.conf" ynh_backup --src_path "/etc/nginx/conf.d/monitorix_status.conf" # Copy hook ynh_backup --src_path "/etc/yunohost/hooks.d/post_iptable_rules/50-$app" # Copy Monitorix configuration ynh_backup --src_path "/etc/monitorix" # Copy Monitorix data ynh_script_progression --message="Backing up data..." --weight=10 ynh_backup --src_path "/var/lib/monitorix" ynh_script_progression --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --last