diff --git a/scripts/upgrade b/scripts/upgrade index 3840432..d7a21e8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -70,6 +70,13 @@ ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint # Create a dedicated NGINX config ynh_add_nginx_config +# Create a dedicated Fail2Ban config +ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="^.*authentication failure\" while reading response header from upstream, client: ,.*$" --max_retry=5 + +ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" +chown root: "/etc/cron.d/$app" +chmod 644 "/etc/cron.d/$app" + #================================================= # SPECIFIC UPGRADE #================================================= @@ -84,25 +91,6 @@ pushd $install_dir php$phpversion cli plugin:upgrade --no-interaction --verbose popd -#================================================= -# SETUP CRON -#================================================= -ynh_script_progression --message="Setuping a cron..." --weight=2 - -ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" -chown root: "/etc/cron.d/$app" -chmod 644 "/etc/cron.d/$app" - -#================================================= -# GENERIC FINALIZATION -#================================================= -# UPGRADE FAIL2BAN -#================================================= -ynh_script_progression --message="Reconfiguring Fail2Ban..." --weight=7 - -# Create a dedicated Fail2Ban config -ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="^.*authentication failure\" while reading response header from upstream, client: ,.*$" --max_retry=5 - #================================================= # END OF SCRIPT #=================================================