aboutsummaryrefslogtreecommitdiffstats
path: root/security/clamsmtp/files/clamsmtpd.sh.in
blob: e3c11351415aa8611e264589ec84551386457126 (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
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: clamsmtpd
# REQUIRE: DAEMON %%CLAMD%%
#
# Add the fellowing line to /etc/rc.conf.local or /etc/rc.conf
# to enable clamsmtpd:
#
# clamsmtpd_enable (bool):  Set it to "YES" to enable clamsmtpd
#               Default is "NO".
# clamsmtpd_conf (file):    Set location of your configuration file.
#               Default is "%%PREFIX%%/etc/clamsmtpd.conf"
#

. %%RC_SUBR%%

name="clamsmtpd"
rcvar=${name}_enable

command=%%PREFIX%%/sbin/${name}
command_args="-f ${clamsmtpd_conf} -p ${clamsmtpd_pid}"
required_files=${clamsmtpd_conf}
pidfile=${clamsmtpd_pid}
sig_stop=-KILL

load_rc_config ${name}

: ${clamsmtpd_enable="NO"}
: ${clamsmtpd_conf="%%PREFIX%%/etc/clamsmtpd.conf"}
: ${clamsmtpd_pid="%%CLAMAV_PID_DIR%%/clamsmtpd.pid"}

run_rc_command "$1"