File: postfix-instance-generator

package info (click to toggle)
postfix 3.7.11-0%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 27,256 kB
  • sloc: ansic: 128,794; makefile: 17,967; sh: 7,208; perl: 2,991; python: 1,460; awk: 158
file content (15 lines) | stat: -rw-r--r-- 362 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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