diff --git a/scripts/install b/scripts/install index 76c1567..d505356 100755 --- a/scripts/install +++ b/scripts/install @@ -170,6 +170,14 @@ ynh_local_curl $installUrl "u_email=$email" "u_firstname=$firstname" "u_name=$la chown -R root: $final_path chown -R $app $final_path/{public,cache,themes,plugins} +#================================================= +# SETUP FAIL2BAN +#================================================= +ynh_script_progression --message="Configuring fail2ban..." + +# Create a dedicated fail2ban config +ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Invalid credentials in /var/www/dotclear2/inc/class.auth.ldap.php .* client: " + #================================================= # SETUP SSOWAT #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 922ed46..ad78629 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -180,6 +180,14 @@ ynh_store_file_checksum --file=$php_config chown -R root: $final_path chown -R $app $final_path/{public,cache,themes,plugins} +#================================================= +# UPGRADE FAIL2BAN +#================================================= +ynh_script_progression --message="Reconfiguring fail2ban..." + +# Create a dedicated fail2ban config +ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Invalid credentials in /var/www/dotclear2/inc/class.auth.ldap.php .* client: " + #================================================= # SETUP SSOWAT #=================================================