summaryrefslogtreecommitdiff
path: root/mail-filter/postfwd/files/postfwd.init.3
diff options
context:
space:
mode:
Diffstat (limited to 'mail-filter/postfwd/files/postfwd.init.3')
-rw-r--r--mail-filter/postfwd/files/postfwd.init.327
1 files changed, 27 insertions, 0 deletions
diff --git a/mail-filter/postfwd/files/postfwd.init.3 b/mail-filter/postfwd/files/postfwd.init.3
new file mode 100644
index 000000000000..7fc17344a31d
--- /dev/null
+++ b/mail-filter/postfwd/files/postfwd.init.3
@@ -0,0 +1,27 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+PIDFILE=/var/run/postfwd.pid
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting postfwd"
+ start-stop-daemon --start --quiet --background \
+ --pidfile ${PIDFILE} \
+ --exec /usr/sbin/postfwd3 -- --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 $?
+}