Sleep instead of stopping containers to prevent restarts

master
andryyy 2017-09-20 12:50:50 +02:00
parent df5c79c3f1
commit b6e84fac3a
3 changed files with 3 additions and 1 deletions

View File

@ -80,7 +80,7 @@ fi
while true; do while true; do
if [[ "${SKIP_LETS_ENCRYPT}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then if [[ "${SKIP_LETS_ENCRYPT}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
echo "SKIP_LETS_ENCRYPT=y, skipping Let's Encrypt..." echo "SKIP_LETS_ENCRYPT=y, skipping Let's Encrypt..."
sleep 3650d sleep 365d
exec $(readlink -f "$0") exec $(readlink -f "$0")
fi fi
if [[ "${SKIP_IP_CHECK}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then if [[ "${SKIP_IP_CHECK}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then

View File

@ -4,6 +4,7 @@ chown -R clamav:clamav /var/log/clamav/
if [[ "${SKIP_CLAMD}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then if [[ "${SKIP_CLAMD}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
echo "SKIP_CLAMD=y, skipping ClamAV..." echo "SKIP_CLAMD=y, skipping ClamAV..."
sleep 365d
exit 0 exit 0
fi fi

View File

@ -15,6 +15,7 @@ import json
yes_regex = re.compile(r'([yY][eE][sS]|[yY])+$') yes_regex = re.compile(r'([yY][eE][sS]|[yY])+$')
if re.search(yes_regex, os.getenv('SKIP_FAIL2BAN', 0)): if re.search(yes_regex, os.getenv('SKIP_FAIL2BAN', 0)):
print "Skipping Fail2ban container..." print "Skipping Fail2ban container..."
time.sleep(31536000)
raise SystemExit raise SystemExit
r = redis.StrictRedis(host='172.22.1.249', decode_responses=True, port=6379, db=0) r = redis.StrictRedis(host='172.22.1.249', decode_responses=True, port=6379, db=0)