blob: f5e0798b43127a0813db459cd65529c59fa6d032 (
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
#! /bin/sh
#
# $NetBSD: authdaemond.sh,v 1.3 2002/02/05 06:04:37 jlam Exp $
#
# Courier user authentication daemon
#
# PROVIDE: authdaemond
# REQUIRE: DAEMON
if [ -f /etc/rc.subr ]
then
. /etc/rc.subr
fi
name="authdaemond"
rcvar=${name}
daemon="@PREFIX@/libexec/courier/authlib/authdaemond"
pidfile="/var/authdaemon/pid"
required_files="@PKG_SYSCONFDIR@/authdaemonrc"
start_cmd="courier_doit start"
stop_cmd="courier_doit stop"
# Read the authdaemond config file to determine the actual command
# executed. If "$version" is non-empty, then it contains the
# command name, otherwise, use the default of "authdaemond.plain".
# We read the config file in a subprocess to protect against shell
# environment pollution.
#
if [ -f @PKG_SYSCONFDIR@/authdaemonrc ]
then
command=`
. @PKG_SYSCONFDIR@/authdaemonrc
if [ -n "${version}" ]
then
@ECHO@ @PREFIX@/libexec/courier/authlib/${version}
else
@ECHO@ @PREFIX@/libexec/courier/authlib/authdaemond.plain
fi
`
fi
courier_doit()
{
action=$1
case ${action} in
start) echo "Starting ${name}." ;;
stop) echo "Stopping ${name}." ;;
esac
@SETENV@ - ${daemon} ${action}
}
if [ -f /etc/rc.subr ]
then
load_rc_config $name
run_rc_command "$1"
else
echo -n " ${name}"
${start_cmd}
fi
|