aboutsummaryrefslogtreecommitdiff
path: root/mail/dspam/files/dspam.rc
blob: 45fb07a1c2bd81302ca486699136a488c3e33d01 (plain) (blame)
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
#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: dspam
# REQUIRE: LOGIN NETWORKING SERVERS %%MYSQL%%
# BEFORE: mail
# KEYWORD: shutdown

#
# Add the following lines to /etc/rc.conf[.local] to enable dspam:
#
# dspam_enable="YES"
#

. /etc/rc.subr

name=dspam
rcvar=`set_rcvar`

command=%%PREFIX%%/bin/${name}
command_args="--daemon  > /dev/null 2>&1 &"
pidfile=/var/run/${name}.pid
required_dirs=%%DSPAM_HOME%%
required_files=%%PREFIX%%/etc/${name}.conf

extra_commands=reload

reload()
{
 kill -HUP `cat $pidfile`
}

# set defaults

dspam_enable=${dspam_enable:-"NO"}
#dspam_flags=${dspam_flags:-"--daemon &"}

load_rc_config $name
run_rc_command "$1"