aboutsummaryrefslogtreecommitdiffstats
path: root/net/openldap24-server/files/slurpd.sh
blob: 4551c5fb0c2d9443bb6869085714cdedaee24bee (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
#!/bin/sh
#
# $FreeBSD$
#

slurpd=@@PREFIX@@/libexec/slurpd
pidfile=/var/run/slurpd.pid

case "$1" in
start)
    if [ -x $slurpd ]; then
        echo -n ' slurpd'
        $slurpd &
        echo $! > $pidfile
    fi
    ;;
stop)
    pids=`ps xa | awk '/slurpd/{ print $1 }'`
    for pid in $pids; do
        kill $pid
        echo -n " slurpd($pid)"
    done
        ;;
restart)
    $0 stop
    $0 start
    ;;
*)
    echo "Usage: `basename $0` {start|stop}" >&2
    exit 64
    ;;
esac

exit 0