summaryrefslogtreecommitdiff
path: root/security/cyrus-sasl2-saslauthd/files/saslauthd.in
blob: 3956866b1eb25251021428faf1c1417e02790c30 (plain)
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
#!/bin/sh

# PROVIDE: saslauthd
# REQUIRE: DAEMON
# BEFORE: mail imap
# KEYWORD: shutdown

# 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

. /etc/rc.subr

name="saslauthd"
rcvar=saslauthd_enable
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"