From 2e75787914a3d4a624a6f9323e92683134cf3023 Mon Sep 17 00:00:00 2001 From: pitchum Date: Wed, 9 May 2018 10:31:46 +0200 Subject: [PATCH] Rewriting packages scripts. backup (WIP). --- scripts/backup | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/scripts/backup b/scripts/backup index dcb98f0..40ae6c7 100644 --- a/scripts/backup +++ b/scripts/backup @@ -18,7 +18,8 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_abort_if_errors # Stop script if an error is detected +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors #================================================= # LOAD SETTINGS @@ -26,6 +27,20 @@ ynh_abort_if_errors # Stop script if an error is detected app=$YNH_APP_INSTANCE_NAME +final_path=$(ynh_app_setting_get $app final_path) +domain=$(ynh_app_setting_get $app domain) +db_name=$(ynh_app_setting_get $app db_name) + +#================================================= +# STANDARD BACKUP STEPS +#================================================= +# BACKUP THE APP MAIN DIR +#================================================= +# LOAD SETTINGS +#================================================= + +app=$YNH_APP_INSTANCE_NAME + final_path=$(ynh_app_setting_get $app final_path) domain=$(ynh_app_setting_get $app domain) @@ -59,3 +74,4 @@ ynh_backup "/etc/systemd/system/ynh-$app.service" # XXX maybe hard-coding the fu ynh_backup "/etc/systemd/system/ynh-$app-checker.service" # XXX maybe hard-coding the full name would be better ynh_backup "/etc/systemd/system/ynh-$app-checker.timer" # XXX maybe hard-coding the full name would be better +ynh_backup "/etc/cron.d/$app"