You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/mail-filter/postsrsd/files/postsrsd.init-r1

31 lines
787 B

#!/sbin/openrc-run
# Copyright 2015-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
PIDFILE=/var/run/$SVCNAME.pid
SRS_DOMAIN="${SRS_DOMAIN:-`postconf -h mydomain || true`}"
SRS_EXCLUDE_DOMAINS="${SRS_EXCLUDE_DOMAINS:-''}"
depend() {
need net
}
start() {
ebegin "Starting ${SVCNAME}"
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--name $SVCNAME \
--exec /usr/sbin/postsrsd \
-- -f "$SRS_FORWARD_PORT" -r "$SRS_REVERSE_PORT" \
-d "$SRS_DOMAIN" -s "$SRS_SECRET" -a "$SRS_SEPARATOR" \
-u "$RUN_AS" -p "$PIDFILE" -c "$CHROOT" \
-D -X"$SRS_EXCLUDE_DOMAINS"
eend $?
}
stop() {
ebegin "Stopping ${SVCNAME}"
start-stop-daemon --stop --quiet --pidfile $PIDFILE \
--name $SVCNAME
eend $?
}