From 66cbc479d7b2fc9bdd2713bc43dd273fda0bb6d9 Mon Sep 17 00:00:00 2001 From: andryyy Date: Fri, 3 Mar 2017 23:31:32 +0100 Subject: [PATCH] Fix Rspamd Dockerfiles --- data/Dockerfiles/rspamd/Dockerfile | 3 ++- data/Dockerfiles/rspamd/docker-entrypoint.sh | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/data/Dockerfiles/rspamd/Dockerfile b/data/Dockerfiles/rspamd/Dockerfile index 45b84fe9..1af7052e 100644 --- a/data/Dockerfiles/rspamd/Dockerfile +++ b/data/Dockerfiles/rspamd/Dockerfile @@ -18,10 +18,11 @@ RUN echo '.include $LOCAL_CONFDIR/local.d/rspamd.conf.local' > /etc/rspamd/rspam ADD settings.conf /etc/rspamd/modules.d/settings.conf ADD antivirus.conf /etc/rspamd/modules.d/antivirus.conf -ADD docker-entrypoint.sh /usr/local/bin +ADD docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh RUN pip install -U oletools RUN timeout 30 /usr/bin/rspamd -f -u _rspamd -g _rspamd; exit 0 +RUN chmod +x /usr/local/bin/docker-entrypoint.sh ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] diff --git a/data/Dockerfiles/rspamd/docker-entrypoint.sh b/data/Dockerfiles/rspamd/docker-entrypoint.sh index a5711074..04a7e046 100755 --- a/data/Dockerfiles/rspamd/docker-entrypoint.sh +++ b/data/Dockerfiles/rspamd/docker-entrypoint.sh @@ -1,10 +1,10 @@ -#!/bin/bash -set -e -while true; do - SC=$(curl -s -o /dev/null -w "%{http_code}" http://nginx:8081/settings.php) - if [[ ${SC} == "200" ]]; then - sleep 3 - exec "$@" - fi - sleep 3 -done +#!/bin/bash +set -e +while true; do + SC=$(curl -s -o /dev/null -w "%{http_code}" http://nginx:8081/settings.php) + if [[ ${SC} == "200" ]]; then + sleep 3 + exec "$@" + fi + sleep 3 +done