Fix trap for postfix for proper sigterm handling
parent
f544739137
commit
977a5b4d47
|
@ -22,4 +22,4 @@ RUN useradd -g vmail -u 5000 vmail -d /var/vmail
|
||||||
|
|
||||||
EXPOSE 588
|
EXPOSE 588
|
||||||
|
|
||||||
CMD /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
|
CMD exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
|
||||||
|
|
|
@ -1,12 +1,7 @@
|
||||||
#!/bin/bash
|
#!/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
|
postfix -c /opt/postfix/conf start
|
||||||
|
|
||||||
sleep infinity
|
sleep infinity
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
[supervisord]
|
[supervisord]
|
||||||
nodaemon=true
|
nodaemon=true
|
||||||
|
loglevel=debug
|
||||||
|
|
||||||
[program:rsyslog]
|
[program:rsyslog]
|
||||||
command=/usr/sbin/rsyslogd -n
|
command=/usr/sbin/rsyslogd -n
|
||||||
|
|
Loading…
Reference in New Issue