Bladeren bron

replaced " by ' because content itself contained "

Chris Vogel 1 jaar geleden
bovenliggende
commit
4ce465d31a
2 gewijzigde bestanden met toevoegingen van 4 en 6 verwijderingen
  1. 2 3
      scripts/install
  2. 2 3
      scripts/upgrade

+ 2 - 3
scripts/install

@@ -122,8 +122,7 @@ chmod 640 "/var/log/$app/$app.log"
 ynh_systemd_action --service_name=$app --action="start"
 
 # SETUP FAIL2BAN
-# @@ todo
-# ynh_script_progression --message="Configuring Fail2Ban..." --weight=3
-# ynh_add_fail2ban_config --logpath="/var/log/$app/$app.log" --failregex="<HOST>:" --max_retry=5
+ynh_script_progression --message="Configuring Fail2Ban..." --weight=3
+ynh_add_fail2ban_config --logpath="/var/log/$app/$app.log" --failregex='INFO: +<HOST>:\d+ - "POST /token HTTP/\d+\.\d+" 403 Forbidden' --max_retry=5
 
 ynh_script_progression --message="Installation of $app completed" --last

+ 2 - 3
scripts/upgrade

@@ -93,9 +93,8 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
 ynh_add_nginx_config
 
 # UPGRADE FAIL2BAN
-# ynh_script_progression --message="Reconfiguring Fail2Ban..." --weight=3
-# Create a dedicated Fail2Ban config
-# ynh_add_fail2ban_config --logpath="/var/log/couchdb/couchdb.log" --failregex="[warning] .*couch_httpd_auth: Authentication failed for user .+ from <HOST>" --max_retry=5
+ynh_script_progression --message="Reconfiguring Fail2Ban..." --weight=3
+ynh_add_fail2ban_config --logpath="/var/log/$app/$app.log" --failregex='INFO: +<HOST>:\d+ - "POST /token HTTP/\d+\.\d+" 403 Forbidden' --max_retry=5
 
 # start flohmarkt
 ynh_script_progression --message="Starting flohmarkt..." --weight=3