2003-06-01 06:24:15 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2004-06-11 17:54:34 +02:00
|
|
|
# $FreeBSD: /tmp/pcvs/ports/security/cyrus-sasl2-saslauthd/files/Attic/saslauthd.sh,v 1.6 2004-06-11 15:49:48 ume Exp $
|
2003-06-01 06:24:15 +02:00
|
|
|
#
|
|
|
|
|
2003-08-28 19:44:28 +02:00
|
|
|
# PROVIDE: saslauthd
|
|
|
|
# REQUIRE: DAEMON
|
|
|
|
# BEFORE: mail imap
|
|
|
|
# KEYWORD: FreeBSD 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
|
2003-06-01 06:24:15 +02:00
|
|
|
|
2003-08-28 19:44:28 +02:00
|
|
|
prefix=%%PREFIX%%
|
2003-06-01 06:24:15 +02:00
|
|
|
|
2003-08-28 19:44:28 +02:00
|
|
|
# Define these saslauthd_* variables in one of these files:
|
|
|
|
# /etc/rc.conf
|
|
|
|
# /etc/rc.conf.local
|
|
|
|
# /etc/rc.conf.d/saslauthd
|
2003-06-01 06:24:15 +02:00
|
|
|
#
|
2004-03-31 18:32:17 +02:00
|
|
|
# DO NOT CHANGE THESE DEFAULT VALUES HERE
|
2003-06-01 06:24:15 +02:00
|
|
|
#
|
2004-03-31 18:32:17 +02:00
|
|
|
saslauthd_enable=${saslauthd_enable:-"NO"} # Enable saslauthd
|
|
|
|
saslauthd_flags=${saslauthd_flags:-"-a pam"} # Flags to saslauthd program
|
2004-05-12 18:12:11 +02:00
|
|
|
#saslauthd_runpath="%%SASLAUTHD_RUNPATH%%" # Working directory
|
2003-08-28 19:44:28 +02:00
|
|
|
#saslauthd_program="${prefix}/sbin/saslauthd" # Location of saslauthd
|
2003-06-01 06:24:15 +02:00
|
|
|
|
2003-08-28 19:44:28 +02:00
|
|
|
. %%RC_SUBR%%
|
2003-06-01 06:24:15 +02:00
|
|
|
|
2003-08-28 19:44:28 +02:00
|
|
|
name="saslauthd"
|
|
|
|
rcvar=`set_rcvar`
|
|
|
|
command="${prefix}/sbin/${name}"
|
2003-06-01 06:24:15 +02:00
|
|
|
|
2003-08-28 19:44:28 +02:00
|
|
|
load_rc_config $name
|
2004-03-31 18:32:17 +02:00
|
|
|
|
|
|
|
if [ -z "$saslauthd_runpath" ]; then
|
2004-05-12 18:12:11 +02:00
|
|
|
pidfile="%%SASLAUTHD_RUNPATH%%/${name}.pid"
|
2004-03-31 18:32:17 +02:00
|
|
|
else
|
|
|
|
pidfile="${saslauthd_runpath}/${name}.pid"
|
2004-06-11 17:54:34 +02:00
|
|
|
command_args="-m ${saslauthd_runpath}"
|
2004-03-31 18:32:17 +02:00
|
|
|
fi
|
|
|
|
|
2003-08-28 19:44:28 +02:00
|
|
|
run_rc_command "$1"
|