diff options
Diffstat (limited to 'debian/postfix-instance-generator')
-rw-r--r-- | debian/postfix-instance-generator | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/debian/postfix-instance-generator b/debian/postfix-instance-generator new file mode 100644 index 0000000..51ca28d --- /dev/null +++ b/debian/postfix-instance-generator @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e + +WANTDIR="$1/postfix.service.wants" +SERVICEFILE="/lib/systemd/system/postfix@.service" + +mkdir -p "$WANTDIR" + +ln -s "$SERVICEFILE" "$WANTDIR/postfix@-.service" +for DIR in $(postconf -h multi_instance_directories); do + ln -s "$SERVICEFILE" "$WANTDIR/postfix@$(postconf -o inet_interfaces= -hc $DIR multi_instance_name).service" +done + +exit 0 |