summaryrefslogtreecommitdiff
path: root/net/openldap23-server/files/slurpd.sh
blob: fc9f88f21cd6981a41359aafdd6443b118ac1e68 (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
45
46
47
48
49
50
#!/bin/sh
#
# $FreeBSD$

slurpd_program=%%PREFIX%%/libexec/slurpd

slurpd_enable="NO"

slurpd_args=

# Add the following line to /etc/rc.conf to enable slurpd:
#
#slurpd_enable="YES"
#
# See slurpd(8) for details
#

# Suck in the configuration variables.
if [ -r /etc/defaults/rc.conf ]; then
    . /etc/defaults/rc.conf
    source_rc_confs
elif [ -r /etc/rc.conf ]; then
    . /etc/rc.conf
fi

case "$slurpd_enable" in
[Yy][Ee][Ss])
    case "$1" in
    start)
        if [ -x ${slurpd_program} ]; then
            echo -n ' slurpd'
            ${slurpd_program} ${slurpd_args} 
        fi
        ;;
    stop)
        if ! killall `basename ${slurpd_program}`; then
            echo ' slurpd: not running'
        fi
        ;;
    *)
        echo "Usage: `basename $0` {start|stop}" >&2
        exit 64
        ;;
    esac
    ;;
*)
    ;;
esac

exit 0