summaryrefslogtreecommitdiff
blob: 03eaa2512f8efd50d4be0ee0171d839fe924f4c1 (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
#!/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 $?
}