From 7a6dd859cb584fa784a59e6f10d1bc2dc3b72626 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 27 May 2020 02:58:51 +0200 Subject: [PATCH] Apply last example_ynh --- scripts/backup | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/scripts/backup b/scripts/backup index b872f02..7170751 100644 --- a/scripts/backup +++ b/scripts/backup @@ -33,28 +33,36 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) db_name=$(ynh_app_setting_get --app=$app --key=db_name) #================================================= -# STANDARD BACKUP STEPS +# DECLARE DATA AND CONF FILES TO BACKUP +#================================================= +ynh_print_info --message="Declaring files to be backed up..." + #================================================= # BACKUP THE APP MAIN DIR #================================================= -ynh_print_info --message="Backing up the main app directory..." ynh_backup --src_path="$final_path" #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= -ynh_print_info --message="Backing up nginx web server configuration..." ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # BACKUP THE PHP-FPM CONFIGURATION #================================================= -ynh_print_info --message="Backing up php-fpm configuration..." ynh_backup --src_path="/etc/php/7.0/fpm/pool.d/$app.conf" +#================================================= +# SPECIFIC BACKUP +#================================================= +# BACKUP A CRON FILE +#================================================= + +ynh_backup --src_path="/etc/cron.d/$app" + #================================================= # BACKUP THE MYSQL DATABASE #================================================= @@ -62,15 +70,6 @@ ynh_print_info --message="Backing up the MySQL database..." ynh_mysql_dump_db --database="$db_name" > db.sql -#================================================= -# SPECIFIC BACKUP -#================================================= -# BACKUP A CRON FILE -#================================================= -ynh_print_info --message="Backing up a cron file..." - -ynh_backup --src_path="/etc/cron.d/$app" - #================================================= # END OF SCRIPT #=================================================