aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/clapf/clapf.initd
blob: b3e6c6dd9056e5f0a3386ba8ccac0d23d24a6d41 (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

description="Email content filter"
extra_started_commands="reload"

command="/usr/sbin/clapf"
pidfile="/var/run/clapf/clapf.pid"
CLAPF_CONF="${CLAPF_CONF:-/etc/clapf.conf}"
CLAPF_USER="${CLAPF_USER:-clapf}"
CLAPF_GROUP="${CLAPF_GROUP:-clapf}"
command_user="$CLAPF_USER${CLAPF_GROUP:+:}$CLAPF_GROUP"
command_args="${CLAPF_OPTS:--c $CLAPF_CONF}"
command_background="YES"

depend() {
	need net
	use logger
	before mta
}

reload() {
	ebegin "Reloading ${name:-$RC_SVCNAME}"
	start-stop-daemon --signal HUP \
		${command:+--exec} $command \
		${pidfile:+--pidfile} $pidfile
	eend $?
}