From 942f0155c99c73dc6fe49cedd41234f50a462b1b Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 14 Feb 2019 19:33:19 +0100 Subject: [PATCH] Apply example_ynh to backup --- scripts/backup | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/backup b/scripts/backup index 1aa2bc1..dd33ed9 100644 --- a/scripts/backup +++ b/scripts/backup @@ -19,6 +19,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= +ynh_print_info "Loading installation settings..." app=$YNH_APP_INSTANCE_NAME @@ -28,14 +29,16 @@ domain=$(ynh_app_setting_get $app domain) #================================================= # STANDARD BACKUP STEPS #================================================= -# BACKUP OF THE MAIN DIR OF THE APP +# BACKUP THE APP MAIN DIR #================================================= +ynh_print_info "Backing up the main app directory..." ynh_backup "$final_path" #================================================= -# BACKUP OF THE NGINX CONFIGURATION +# BACKUP THE NGINX CONFIGURATION #================================================= +ynh_print_info "Backing up nginx configuration..." ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" @@ -44,6 +47,12 @@ ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # BACKUP SYSTEMD #================================================= +ynh_print_info "Backing up systemd configuration..." ynh_backup "/etc/systemd/system/$app.service" +#================================================= +# END OF SCRIPT +#================================================= + +ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."