blob: 9bc2c6eda6d4591e35fbe032032f4811848f4c60 (
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
34
35
36
37
38
39
40
41
42
43
44
|
#!/bin/sh
#
# $Id$
#
# PROVIDE: rspamd
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable countd:
# rspamd (bool): Set to "NO" by default.
# Set it to "YES" to enable rspamd.
. /etc/rc.subr
name="rspamd"
rcvar=`set_rcvar`
procname="@CMAKE_INSTALL_PREFIX@/bin/rspamd"
restart_precmd="rspamd_checkconfig"
reload_precmd="rspamd_checkconfig"
configtest_cmd="rspamd_checkconfig"
load_rc_config $name
: ${rspamd_enable="NO"}
: ${rspamd_pidfile="/var/run/rspamd/rspamd.pid"}
: ${rspamd_user="@RSPAMD_USER@"}
: ${rspamd_group="@RSPAMD_GROUP@"}
stop_postcmd="rm -f $rspamd_pidfile"
rspamd_checkconfig()
{
echo "Performing sanity check on rspamd configuration:"
eval ${command} -t
}
extra_commands="reload configtest"
sig_reload="USR1"
command="$procname"
command_args="-u ${rspamd_user} -g ${rspamd_group} -c @CMAKE_INSTALL_PREFIX@/etc/rspamd.conf"
run_rc_command "$1"
|