#!/bin/bash # to test the functionnality : # yunohost backup create -n "octoprint-test" --apps octoprint # yunohost backup delete octoprint-test source /usr/share/yunohost/helpers # manage script failure #REMOVEME? ynh_abort_if_errors # retrieve arguments #REMOVEME? app=$YNH_APP_INSTANCE_NAME #REMOVEME? domain=$(ynh_app_setting_get "$app" domain) # definie useful vars #REMOVEME? install_dir="/opt/yunohost/$app" home_path="/home/$app" # backup source & conf files ynh_backup "$install_dir" ynh_backup "$home_path" ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup "/etc/sudoers.d/$app" ynh_backup "/etc/systemd/system/$app@$app.service"