summaryrefslogtreecommitdiff
blob: 34dc52214e48b041081e52dce81818e2e0d58271 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/sbin/openrc-run
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

PIDFILE=/var/run/postfwd.pid

depend() {
	need net
}

start() {
	ebegin "Starting postfwd"
		start-stop-daemon --start --quiet --background \
		--pidfile ${PIDFILE} \
		--exec /usr/sbin/postfwd2 -- --daemon --file ${POSTFWD_CONFIG} \
			--interface=${POSTFWD_LISTEN} --port=${POSTFWD_PORT} \
			--user=${POSTFWD_USER} --group=${POSTFWD_GROUP} \
			--pidfile ${PIDFILE} \
			${POSTFWD_OPTS}
	eend $?
}

stop() {
	ebegin "Stopping postfwd"
		start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
	eend $?
}