summaryrefslogtreecommitdiff
blob: d155a4a43b4e4a50b01d4f03fa051f77f2e5aa0d (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
#!/sbin/openrc-run
# Copyright 2015 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}"
	mkdir -m0750 -p $RUNDIR
	chown rmilter:rmilter $RUNDIR
	chmod g+s $RUNDIR
	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 $?
}