summaryrefslogtreecommitdiff
blob: 0b40013d778e66f7311e98ff0e5bcf2959a3c299 (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/runscript
# 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 $?
}