remove ClamAV because of GPL and started work on read-only filesystem

This commit is contained in:
bunkerity
2021-05-26 17:18:49 +02:00
parent a8bc17e836
commit a991b262ef
24 changed files with 91 additions and 69 deletions

View File

@@ -3,6 +3,14 @@
# load some functions
. /opt/entrypoint/utils.sh
if [ $(grep "^SWARM_MODE=yes$" /etc/nginx/global.env) != "" ] && [ -f /usr/sbin/nginx ] ; then
exit 0
fi
if [ "$(has_value BLOCK_ABUSERS yes)" = "" ] ; then
exit 0
fi
# copy old conf to cache
cp /etc/nginx/abusers.list /cache

View File

@@ -3,6 +3,14 @@
# load some functions
. /opt/entrypoint/utils.sh
if [ $(grep "^SWARM_MODE=yes$" /etc/nginx/global.env) != "" ] && [ -f /usr/sbin/nginx ] ; then
exit 0
fi
if [ "$(has_value AUTO_LETS_ENCRYPT yes)" = "" ] ; then
exit 0
fi
# ask new certificates if needed
certbot renew --deploy-hook /opt/scripts/certbot-renew-hook.sh

View File

@@ -1,9 +0,0 @@
#!/bin/sh
output=$(clamscan -i --no-summary $1 2> /dev/null)
rm -f $1
if echo "$output" | grep -q ".* FOUND$" ; then
echo "0 clamscan: $output"
else
echo "1 clamscan: ok"
fi

View File

@@ -3,6 +3,14 @@
# load some functions
. /opt/entrypoint/utils.sh
if [ $(grep "^SWARM_MODE=yes$" /etc/nginx/global.env) != "" ] && [ -f /usr/sbin/nginx ] ; then
exit 0
fi
if [ "$(has_value BLOCK_TOR_EXIT_NODE yes)" = "" ] ; then
exit 0
fi
# copy old conf to cache
cp /etc/nginx/tor-exit-nodes.list /cache

View File

@@ -3,6 +3,14 @@
# load some functions
. /opt/entrypoint/utils.sh
if [ $(grep "^SWARM_MODE=yes$" /etc/nginx/global.env) != "" ] && [ -f /usr/sbin/nginx ] ; then
exit 0
fi
if [ "$(has_value BLACKLIST_COUNTRY .+)" = "" ] && [ "$(has_value WHITELIST_COUNTRY .+)" = "" ] ; then
exit 0
fi
# if we are running nginx
if [ -f /tmp/nginx.pid ] ; then
RELOAD="/usr/sbin/nginx -s reload"

View File

@@ -3,6 +3,14 @@
# load some functions
. /opt/entrypoint/utils.sh
if [ $(grep "^SWARM_MODE=yes$" /etc/nginx/global.env) != "" ] && [ -f /usr/sbin/nginx ] ; then
exit 0
fi
if [ "$(has_value BLOCK_PROXIES yes)" = "" ] ; then
exit 0
fi
# copy old conf to cache
cp /etc/nginx/proxies.list /cache

View File

@@ -3,6 +3,14 @@
# load some functions
. /opt/entrypoint/utils.sh
if [ $(grep "^SWARM_MODE=yes$" /etc/nginx/global.env) != "" ] && [ -f /usr/sbin/nginx ] ; then
exit 0
fi
if [ "$(has_value BLOCK_REFERRER yes)" = "" ] ; then
exit 0
fi
# save old conf
cp /etc/nginx/referrers.list /cache

View File

@@ -3,6 +3,14 @@
# load some functions
. /opt/entrypoint/utils.sh
if [ $(grep "^SWARM_MODE=yes$" /etc/nginx/global.env) != "" ] && [ -f /usr/sbin/nginx ] ; then
exit 0
fi
if [ "$(has_value BLOCK_USER_AGENT yes)" = "" ] ; then
exit 0
fi
# save old conf
cp /etc/nginx/user-agents.list /cache