2
0
mirror of https://github.com/tomav/docker-mailserver synced 2025-09-03 15:55:24 +00:00

refactoring: split helper functions into smaller scripts (#2420)

This commit is contained in:
Georg Lauterbach
2022-02-21 11:56:57 +01:00
committed by GitHub
parent 2927cc47c7
commit b61dfe1e24
41 changed files with 389 additions and 396 deletions

View File

@@ -0,0 +1,29 @@
#! /bin/bash
# You cannot start postfix in some foreground mode and
# it's more or less important that docker doesn't kill
# postfix and its chilren if you stop the container.
#
# Use this script with supervisord and it will take
# care about starting and stopping postfix correctly.
#
# supervisord config snippet for postfix-wrapper:
#
# [program:postfix]
# process_name = postfix
# command = /path/to/postfix-wrapper.sh
# startsecs = 0
# autorestart = false
#
trap "service postfix stop" SIGINT
trap "service postfix stop" SIGTERM
trap "service postfix reload" SIGHUP
service postfix start
# wait until postfix is dead (triggered by trap)
while kill -0 "$(< /var/spool/postfix/pid/master.pid)"
do
sleep 5
done