25788569a2
the authentication daemon. Fix provided by Inseo Park in private mail. Also, honor VARBASE. Bump the PKGREVISION to 1.
46 lines
813 B
Bash
46 lines
813 B
Bash
#!@RCD_SCRIPTS_SHELL@
|
|
#
|
|
# $NetBSD: authdaemond.sh,v 1.2 2005/02/21 17:08:39 jlam Exp $
|
|
#
|
|
# Courier user authentication daemon
|
|
#
|
|
# PROVIDE: authdaemond
|
|
# REQUIRE: LOGIN
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="authdaemond"
|
|
rcvar=${name}
|
|
command="@PREFIX@/sbin/courierlogger"
|
|
ctl_command="@PREFIX@/sbin/authdaemond"
|
|
pidfile="@AUTHDAEMONVAR@/pid"
|
|
required_files="@PKG_SYSCONFDIR@/authdaemonrc"
|
|
|
|
start_cmd="courier_doit start"
|
|
stop_cmd="courier_doit stop"
|
|
|
|
courier_doit()
|
|
{
|
|
action=$1
|
|
case ${action} in
|
|
start)
|
|
for f in $required_files; do
|
|
if [ ! -r "$f" ]; then
|
|
@ECHO@ 1>&2 "$0: WARNING: $f is not readable"
|
|
if [ -z $rc_force ]; then
|
|
return 1
|
|
fi
|
|
fi
|
|
done
|
|
@ECHO@ "Starting ${name}."
|
|
;;
|
|
stop)
|
|
@ECHO@ "Stopping ${name}."
|
|
;;
|
|
esac
|
|
|
|
${ctl_command} ${action}
|
|
}
|
|
|
|
load_rc_config $name
|
|
run_rc_command "$1"
|