summaryrefslogtreecommitdiff
path: root/security/amavisd/files/amavisd.sh
blob: 2528df76010550a13c67d2d9d926e27eced7590a (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: amavisd
# BEFORE: mail
# KEYWORD: FreeBSD shutdown

prefix=%%PREFIX%%

# Define these amavisd_* variables in one of these files:
#       /etc/rc.conf
#       /etc/rc.conf.local
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
amavisd_enable=no
amavisd_flags=""
amavisd_user=%%AMAVISUSER%%

. %%RC_SUBR%%

name="amavisd"
rcvar=`set_rcvar`
start_precmd="remove_socket"
stop_postcmd="remove_socket"
command=${prefix}/sbin/amavisd
command_arg="> /dev/null 2>&1"
command_interpreter="%%PERL%%"
pidfile="/var/amavis/amavisd.pid"

# Remove the AMaViSd Socket
remove_socket()
{
	if [ -S /var/amavis/amavisd.sock ]; then
		rm -f /var/amavis/amavisd.sock
	fi
}

load_rc_config $name
run_rc_command "$1"