From 5501308aed695ef3880423bef8a3e92529afc65f Mon Sep 17 00:00:00 2001 From: James Stewart Miller Date: Sat, 26 Mar 2022 20:46:39 +0000 Subject: [PATCH 1/2] Update 50-config create fail2ban unauthorized.log added code to test for existence of unauthorized.log and create it if not exists. /config/log/nginx/unauthorized.log is written to by addition of nginx-unauthorized jail in jail.local at (https://github.com/linuxserver/docker-swag/blob/master/root/defaults/jail.local) --- root/etc/cont-init.d/50-config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/root/etc/cont-init.d/50-config b/root/etc/cont-init.d/50-config index abe45b1..f003e3c 100644 --- a/root/etc/cont-init.d/50-config +++ b/root/etc/cont-init.d/50-config @@ -366,6 +366,8 @@ fi touch /config/log/nginx/error.log [[ ! -f /config/log/nginx/access.log ]] && \ touch /config/log/nginx/access.log +[[ ! -f /config/log/nginx/unauthorized.log ]] && \ + touch /config/log/nginx/unauthorized.log # permissions chown -R abc:abc \ From 9821740d65b5468627cd61b9db8323e70f7a11fb Mon Sep 17 00:00:00 2001 From: James Stewart Miller Date: Mon, 28 Mar 2022 21:57:19 +0100 Subject: [PATCH 2/2] Update readme-vars.yml added changelog --- readme-vars.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/readme-vars.yml b/readme-vars.yml index a033ea4..a6dcf01 100755 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -154,6 +154,7 @@ app_setup_nginx_reverse_proxy_block: "" # changelog changelogs: + - { date: "28.03.22:", desc: "created a logfile for fail2ban nginx-unauthorized in /etc/cont-init.d/50-config" } - { date: "09.01.22:", desc: "Added a fail2ban jail for nginx unauthorized" } - { date: "21.12.21:", desc: "Fixed issue with iptables not working as expected" } - { date: "30.11.21:", desc: "Move maxmind to a [new mod](https://github.com/linuxserver/docker-mods/tree/swag-maxmind)" }