display fail2ban.log and logging bug fix
This commit is contained in:
parent
4c11a9125c
commit
022a653ebc
|
@ -612,10 +612,14 @@ fi
|
|||
# setup logrotate
|
||||
replace_in_file "/etc/logrotate.conf" "%LOGROTATE_MAXAGE%" "$LOGROTATE_MAXAGE"
|
||||
replace_in_file "/etc/logrotate.conf" "%LOGROTATE_MINSIZE%" "$LOGROTATE_MINSIZE"
|
||||
echo "0 0 * * * logrotate -f /etc/logrotate.conf > /dev/null 2>&1" >> /etc/crontabs/root
|
||||
echo "0 0 * * * logrotate -f /etc/logrotate.conf > /dev/null 2>&1 && pkill -HUP rsyslogd && fail2ban-client restart && nginx -s reload" >> /etc/crontabs/root
|
||||
|
||||
# display logs
|
||||
tail -f /var/log/access.log /var/log/error.log &
|
||||
LOGS="/var/log/access.log /var/log/error.log"
|
||||
if [ "$USE_FAIL2BAN" = "yes" ] ; then
|
||||
LOGS="$LOGS /var/log/fail2ban.log"
|
||||
fi
|
||||
tail -f $LOGS &
|
||||
wait $!
|
||||
|
||||
# sigterm trapped
|
||||
|
|
|
@ -5,7 +5,6 @@ chmod +x manifest-tool
|
|||
|
||||
VERSION=$(cat VERSION | tr -d '\n')
|
||||
if [ "$SOURCE_BRANCH" = "dev" ] ; then
|
||||
./manifest-tool push from-args --ignore-missing --platforms linux/amd64,linux/386,linux/arm/v7,linux/arm64/v8 --template bunkerity/bunkerized-nginx:dev-ARCHVARIANT --target bunkerity/bunkerized-nginx:dev-${VERSION}
|
||||
./manifest-tool push from-args --ignore-missing --platforms linux/amd64,linux/386,linux/arm/v7,linux/arm64/v8 --template bunkerity/bunkerized-nginx:dev-ARCHVARIANT --target bunkerity/bunkerized-nginx:dev
|
||||
elif [ "$SOURCE_BRANCH" = "master" ] ; then
|
||||
./manifest-tool push from-args --ignore-missing --platforms linux/amd64,linux/386,linux/arm/v7,linux/arm64/v8 --template bunkerity/bunkerized-nginx:ARCHVARIANT --target bunkerity/bunkerized-nginx:${VERSION}
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
image: bunkerity/bunkerized-nginx:dev
|
||||
manifests:
|
||||
- image: bunkerity/bunkerized-nginx:dev-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: linux
|
||||
- image: bunkerity/bunkerized-nginx:dev-arm32v7
|
||||
platform:
|
||||
architecture: arm
|
||||
os: linux
|
||||
variant: v7
|
||||
- image: bunkerity/bunkerized-nginx:dev-arm64v8
|
||||
platform:
|
||||
architecture: arm64
|
||||
os: linux
|
||||
variant: v8
|
||||
- image: bunkerity/bunkerized-nginx:dev-i386
|
||||
platform:
|
||||
architecture: 386
|
||||
os: linux
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
image: bunkerity/bunkerized-nginx:latest
|
||||
manifests:
|
||||
- image: bunkerity/bunkerized-nginx:amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: linux
|
||||
- image: bunkerity/bunkerized-nginx:arm32v7
|
||||
platform:
|
||||
architecture: arm
|
||||
os: linux
|
||||
variant: v7
|
||||
- image: bunkerity/bunkerized-nginx:arm64v8
|
||||
platform:
|
||||
architecture: arm64
|
||||
os: linux
|
||||
variant: v8
|
||||
- image: bunkerity/bunkerized-nginx:i386
|
||||
platform:
|
||||
architecture: 386
|
||||
os: linux
|
||||
|
|
@ -3,7 +3,10 @@
|
|||
echo "" > /etc/nginx/block-abusers.conf
|
||||
curl -s "https://iplists.firehol.org/files/firehol_abusers_30d.netset" | grep -v "^\#.*" |
|
||||
while read entry ; do
|
||||
echo "deny ${entry};" >> /etc/nginx/block-abusers.conf
|
||||
check=$(echo $entry | grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/?[0-9]*$")
|
||||
if [ "$check" != "" ] ; then
|
||||
echo "deny ${entry};" >> /etc/nginx/block-abusers.conf
|
||||
fi
|
||||
done
|
||||
if [ -f /tmp/nginx.pid ] ; then
|
||||
/usr/sbin/nginx -s reload
|
||||
|
|
|
@ -3,7 +3,10 @@
|
|||
echo "" > /etc/nginx/block-tor-exit-node.conf
|
||||
curl -s "https://iplists.firehol.org/files/tor_exits.ipset" | grep -v "^\#.*" |
|
||||
while read entry ; do
|
||||
echo "deny ${entry};" >> /etc/nginx/block-tor-exit-node.conf
|
||||
check=$(echo $entry | grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/?[0-9]*$")
|
||||
if [ "$check" != "" ] ; then
|
||||
echo "deny ${entry};" >> /etc/nginx/block-tor-exit-node.conf
|
||||
fi
|
||||
done
|
||||
if [ -f /tmp/nginx.pid ] ; then
|
||||
/usr/sbin/nginx -s reload
|
||||
|
|
|
@ -3,7 +3,10 @@
|
|||
echo "" > /etc/nginx/block-proxies.conf
|
||||
curl -s "https://iplists.firehol.org/files/firehol_proxies.netset" | grep -v "^\#.*" |
|
||||
while read entry ; do
|
||||
echo "deny ${entry};" >> /etc/nginx/block-proxies.conf
|
||||
check=$(echo $entry | grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/?[0-9]*$")
|
||||
if [ "$check" != "" ] ; then
|
||||
echo "deny ${entry};" >> /etc/nginx/block-proxies.conf
|
||||
fi
|
||||
done
|
||||
if [ -f /tmp/nginx.pid ] ; then
|
||||
/usr/sbin/nginx -s reload
|
||||
|
|
Loading…
Reference in New Issue