From 4b2445cf043c43f7850fc334e4242c482be4526e Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 13 Jan 2024 13:46:14 +0100 Subject: [PATCH] cleaning --- scripts/backup | 1 + scripts/install | 1 - scripts/remove | 6 ------ scripts/restore | 7 ------- scripts/upgrade | 8 +------- 5 files changed, 2 insertions(+), 21 deletions(-) diff --git a/scripts/backup b/scripts/backup index 601ba33..04eed75 100644 --- a/scripts/backup +++ b/scripts/backup @@ -36,6 +36,7 @@ ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" #================================================= # BACKUP FAIL2BAN CONFIGURATION #================================================= + ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf" ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf" diff --git a/scripts/install b/scripts/install index 00d0a28..e4d676d 100644 --- a/scripts/install +++ b/scripts/install @@ -58,7 +58,6 @@ ynh_add_nginx_config #================================================= # SETUP FAIL2BAN #================================================= - ynh_script_progression --message="Configuring fail2ban..." --weight=1 # Create the logfile, required before configuring fail2ban diff --git a/scripts/remove b/scripts/remove index f4d1571..8d28c8c 100644 --- a/scripts/remove +++ b/scripts/remove @@ -18,12 +18,6 @@ ynh_remove_nginx_config ynh_remove_fpm_config -#================================================= -# REMOVE FAIL2BAN CONFIGURATION -#================================================= - -ynh_script_progression --message="Removing fail2ban configuration..." --weight=1 - ynh_remove_fail2ban_config #================================================= diff --git a/scripts/restore b/scripts/restore index 9729fbb..77daf9b 100644 --- a/scripts/restore +++ b/scripts/restore @@ -45,19 +45,12 @@ ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./ #================================================= # RESTORE SYSTEM CONFIGURATIONS #================================================= -# RESTORE THE PHP-FPM CONFIGURATION -#================================================= ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# RESTORE FAIL2BAN CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the fail2ban configuration..." --weight=1 - ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf" ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf" ynh_systemd_action --action=restart --service_name=fail2ban diff --git a/scripts/upgrade b/scripts/upgrade index ebd4936..8ad1c75 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -30,7 +30,7 @@ chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" #================================================= -# PHP-FPM CONFIGURATION +# SYSTEM CONFIGURATION #================================================= ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 @@ -38,12 +38,6 @@ ynh_add_fpm_config ynh_add_nginx_config -#================================================= -# SETUP FAIL2BAN -#================================================= - -ynh_script_progression --message="Upgrading fail2ban configuration..." --weight=1 - # Create the logfile, required before configuring fail2ban touch "/var/log/${domain}-error.log"