summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirkjan Ochtman <djc@gentoo.org>2017-01-03 20:00:39 +0100
committerDirkjan Ochtman <djc@gentoo.org>2017-01-03 20:00:51 +0100
commit918473fa31099a4d596ad4ff50b52417b15169fe (patch)
tree86e9fb25b51b34117e4f401164da5057a68556d7 /mail-filter/rmilter/files
parentmail-filter/rspamd: use checkpath in init script (fixes bug 603248) (diff)
downloadgentoo-918473fa31099a4d596ad4ff50b52417b15169fe.tar.gz
gentoo-918473fa31099a4d596ad4ff50b52417b15169fe.tar.bz2
gentoo-918473fa31099a4d596ad4ff50b52417b15169fe.zip
mail-filter/rmilter: use checkpath in init script (fixes bug 603336)
Package-Manager: portage-2.3.0
Diffstat (limited to 'mail-filter/rmilter/files')
-rw-r--r--mail-filter/rmilter/files/rmilter.initd-r125
1 files changed, 25 insertions, 0 deletions
diff --git a/mail-filter/rmilter/files/rmilter.initd-r1 b/mail-filter/rmilter/files/rmilter.initd-r1
new file mode 100644
index 000000000000..03eaa2512f8e
--- /dev/null
+++ b/mail-filter/rmilter/files/rmilter.initd-r1
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 2015-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+RUNDIR=/var/run/rmilter
+PIDFILE=$RUNDIR/rmilter.pid
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ checkpath -d $RUNDIR -m2750 -o rmilter:rmilter
+ rm -f $RUNDIR/$SVCNAME.sock
+ start-stop-daemon --start --quiet --pidfile $PIDFILE -u rmilter \
+ --exec /usr/sbin/rmilter -- -c /etc/rmilter/rmilter.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE
+ eend $?
+}