2003-02-24 05:27:22 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
slurpd=@@PREFIX@@/libexec/slurpd
|
2003-05-23 02:21:04 +02:00
|
|
|
pidfile=/var/run/ldap/slurpd.pid
|
2003-02-24 05:27:22 +01:00
|
|
|
|
|
|
|
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
|