From 1ae54d4a8d470ae4f7cf8064e437561b352dc867 Mon Sep 17 00:00:00 2001 From: lapineige Date: Wed, 24 Apr 2019 10:59:05 +0200 Subject: [PATCH] Add fail2ban config during upgrade To make sure any older version will get fail2ban support --- scripts/upgrade | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 6810d90..3bbbe22 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -113,6 +113,9 @@ exec_console $app "${final_path}" cache:clear # Configure Wallabag instance URL ynh_mysql_connect_as "$db_name" "$db_pwd" "$db_user" <<< "UPDATE craue_config_setting SET value = 'https://$domain$path_url' WHERE name = 'wallabag_url'" +# Set-up fail2ban +ynh_add_fail2ban_config --logpath="/var/www/$app/var/logs/prod.log" --failregex="app.ERROR: Authentication failure" --max_retry=5 # same as install config + #================================================= # NGINX CONFIGURATION #================================================= @@ -139,4 +142,4 @@ ynh_app_setting_set "$app" unprotected_uris "/" # RELOAD NGINX #================================================= systemctl restart php5-fpm -systemctl reload nginx \ No newline at end of file +systemctl reload nginx