From 7b0066eca729d8513006cad2c0bc9ec58082ec3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 24 Oct 2023 10:18:22 +0200 Subject: [PATCH] Update install --- scripts/install | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/scripts/install b/scripts/install index 699ae44..9bc25ac 100644 --- a/scripts/install +++ b/scripts/install @@ -51,6 +51,13 @@ ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint # Create a dedicated NGINX config ynh_add_nginx_config +ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" +chown root: "/etc/cron.d/$app" +chmod 644 "/etc/cron.d/$app" + +# 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 + #================================================= # SPECIFIC SETUP #================================================= @@ -76,25 +83,6 @@ pushd $install_dir php$phpversion cli db:migrate --no-interaction --verbose popd -#================================================= -# SETUP CRON -#================================================= -ynh_script_progression --message="Setuping a cron..." --weight=1 - -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 -#================================================= -# SETUP FAIL2BAN -#================================================= -ynh_script_progression --message="Configuring Fail2Ban..." --weight=10 - -# 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 #=================================================