Tweak editors/scribes version 0.4.b954_1
[dports.git] / mail / dspam-devel / files / dspam-devel.in
1 #!/bin/sh
2 # $FreeBSD: head/mail/dspam-devel/files/dspam-devel.in 340872 2014-01-24 00:14:07Z mat $
3 #
4
5 # PROVIDE: dspam
6 # REQUIRE: DAEMON %%MYSQL%% %%PGSQL%% %%CLAMD%%
7 # BEFORE: mail
8 # KEYWORD: shutdown
9
10 #
11 # Add the following lines to /etc/rc.conf[.local] to enable dspam:
12 # dspam_enable="YES"
13 #
14 # dspam_debug="YES" will start dspam with debug logging (you need ar least WITH_DEBUG)
15 # you can also set the pid file via dspam_pidfile
16 #
17
18 . /etc/rc.subr
19
20 name="dspam"
21 rcvar=dspam_enable
22
23 load_rc_config $name
24
25 #defaults
26 : ${dspam_enable="NO"}
27 : ${dspam_debug="NO"}
28 : ${dspam_pidfile:-/var/run/dspam.pid}
29
30 command=%%PREFIX%%/bin/${name}
31 if checkyesno dspam_debug
32 then
33         command_args="--daemon --debug > /dev/null 2>&1 &"
34 else
35         command_args="--daemon > /dev/null 2>&1 &"
36 fi
37 required_dirs=%%DSPAM_HOME%%
38 required_files=%%PREFIX%%/etc/${name}.conf
39
40 extra_commands=reload
41 reload()
42 {
43  kill -HUP `cat $pidfile`
44 }
45
46 run_rc_command "$1"