blob: 5189e493486ef38a7ae535c905a55428d3505635 (
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
28
29
|
#!/sbin/openrc-run
description="Rapid spam filtering system"
command="/usr/sbin/rspamd"
command_args="-u rspamd -g rspamd"
cfgfile=${cfgfile:-/etc/rspamd/rspamd.conf}
pidfile="/run/rspamd/rspamd.pid"
required_files="$cfgfile"
extra_started_commands="reload"
description_reload="Reload configuration"
depend() {
need localmount net
before exim postfix
}
start_pre() {
ebegin
[ "$cfgfile" = "/etc/rspamd/rspamd.conf" ] || command_args="$command_args -c $cfgfile"
checkpath --directory --mode 750 --owner rspamd:rspamd "${pidfile%/*}"
$command $command_args -t &>/dev/null
eend $?
}
reload() {
ebegin "Reloading ${SVCNAME}"
start-stop-daemon --signal HUP --pidfile ${pidfile}
eend $?
}
|