File: postsrsd.upstart.in

package info (click to toggle)
postsrsd 1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 324 kB
  • ctags: 163
  • sloc: ansic: 1,462; sh: 204; makefile: 23
file content (24 lines) | stat: -rw-r--r-- 705 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
description "Postfix Sender Rewriting Scheme daemon"
author "Timo Röhling <timo.roehling@gmx.de>"

start on (filesystem and net-device-up)
stop on runlevel [!2345]
respawn

env DEFAULTFILE=@CONFIG_DIR@/@PROJECT_NAME@

script
	SRS_DOMAIN=`postconf -h mydomain || true`
	SRS_FORWARD_PORT=10001
	SRS_REVERSE_PORT=10002
	SRS_SECRET=@SYSCONF_DIR@/@PROJECT_NAME@.secret
	SRS_SEPARATOR==
	SRS_EXCLUDE_DOMAINS=
	RUN_AS=postsrsd
	CHROOT=@CHROOT_DIR@
	if [ -r "$DEFAULTFILE" ]; then
		. "$DEFAULTFILE"
	fi
	exec @CMAKE_INSTALL_PREFIX@/sbin/@POSTSRSD@ -f "$SRS_FORWARD_PORT" -r "$SRS_REVERSE_PORT" -d "$SRS_DOMAIN" -s "$SRS_SECRET" -a "$SRS_SEPARATOR" -u "$RUN_AS" -c "$CHROOT" -X"$SRS_EXCLUDE_DOMAINS"
end script