From 977a5b4d470809edcfe8be351c88b990914ad7dc Mon Sep 17 00:00:00 2001 From: andryyy Date: Tue, 13 Dec 2016 07:58:53 +0100 Subject: [PATCH] Fix trap for postfix for proper sigterm handling --- data/Dockerfiles/postfix/Dockerfile | 2 +- data/Dockerfiles/postfix/postfix.sh | 7 +------ data/Dockerfiles/postfix/supervisord.conf | 1 + 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/data/Dockerfiles/postfix/Dockerfile b/data/Dockerfiles/postfix/Dockerfile index 1ca74d69..60c33cc0 100644 --- a/data/Dockerfiles/postfix/Dockerfile +++ b/data/Dockerfiles/postfix/Dockerfile @@ -22,4 +22,4 @@ RUN useradd -g vmail -u 5000 vmail -d /var/vmail EXPOSE 588 -CMD /usr/bin/supervisord -c /etc/supervisor/supervisord.conf +CMD exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf diff --git a/data/Dockerfiles/postfix/postfix.sh b/data/Dockerfiles/postfix/postfix.sh index e2cf2b5b..6e7aca83 100755 --- a/data/Dockerfiles/postfix/postfix.sh +++ b/data/Dockerfiles/postfix/postfix.sh @@ -1,12 +1,7 @@ #!/bin/bash -# http://superuser.com/questions/168412/using-supervisord-to-control-the-postfix-mta +trap "postfix stop" EXIT -trap "postfix stop" SIGINT -trap "postfix stop" SIGTERM -trap "postfix reload" SIGHUP - -# start postfix postfix -c /opt/postfix/conf start sleep infinity diff --git a/data/Dockerfiles/postfix/supervisord.conf b/data/Dockerfiles/postfix/supervisord.conf index f49940fd..bae9a9aa 100644 --- a/data/Dockerfiles/postfix/supervisord.conf +++ b/data/Dockerfiles/postfix/supervisord.conf @@ -1,5 +1,6 @@ [supervisord] nodaemon=true +loglevel=debug [program:rsyslog] command=/usr/sbin/rsyslogd -n