aboutsummaryrefslogtreecommitdiff
path: root/security/cyrus-sasl2-saslauthd/files/saslauthd.sh.in
blob: 56170d27d1ebd2b5d5218da05c6a78eec505f066 (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
42
43
44
#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: saslauthd
# REQUIRE: DAEMON
# BEFORE: mail imap
# KEYWORD: shutdown
#
# NOTE for FreeBSD 5.0+:
# If you want this script to start with the base rc scripts
# move saslauthd.sh to /etc/rc.d/saslauthd

prefix=%%PREFIX%%

# Define these saslauthd_* variables in one of these files:
#	/etc/rc.conf
#	/etc/rc.conf.local
#	/etc/rc.conf.d/saslauthd
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
saslauthd_enable=${saslauthd_enable:-"NO"}	# Enable saslauthd
saslauthd_flags=${saslauthd_flags:-"-a pam"}	# Flags to saslauthd program
#saslauthd_runpath="%%SASLAUTHD_RUNPATH%%"	# Working directory
#saslauthd_program="${prefix}/sbin/saslauthd"	# Location of saslauthd

. %%RC_SUBR%%

name="saslauthd"
rcvar=`set_rcvar`
command="${prefix}/sbin/${name}"

load_rc_config $name

if [ -z "$saslauthd_runpath" ]; then
	pidfile="%%SASLAUTHD_RUNPATH%%/${name}.pid"
else
	pidfile="${saslauthd_runpath}/${name}.pid"
	command_args="-m ${saslauthd_runpath}"
fi

run_rc_command "$1"