summaryrefslogtreecommitdiffstats
path: root/freebsd/redirector.sh.in
blob: 9540e352fd29fc2ecd2c5bf75dbc53f01104943f (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
30
31
32
33
#!/bin/sh
#
# $Id$
#
# PROVIDE: rspamd_redirector
# REQUIRE: LOGIN
# KEYWORD: shutdown

#
# Add the following line to /etc/rc.conf to enable countd:
# rspamd-redirector (bool):          Set to "NO" by default.
#                          Set it to "YES" to enable redirector.

. /etc/rc.subr

name="rspamd_redirector"
rcvar=`set_rcvar`
procname="@CMAKE_INSTALL_PREFIX@/bin/rspamd-redirector"

load_rc_config $name

: ${rspamd_redirector_enable="NO"}
: ${rspamd_redirector_pidfile="/var/run/rspamd/redirector.pid"}

stop_postcmd="rm -f $rspamd_redirector_pidfile"

extra_commands="reload"
sig_reload="USR1"

command="$procname"
command_interpreter="/usr/bin/perl"

run_rc_command "$1"