#!/bin/sh
#
# nscd:		Starts the Name Switch Cache Daemon
#
# description:  This is a daemon which handles passwd and group lookups \
#		for running programs and cache the results for the next \
#		query.  You should start this daemon only if you use \
#		slow Services like NIS or NIS+
#

# Sanity checks.
[ -f /etc/nscd.conf ] || exit 0
[ -x /usr/sbin/nscd ] || exit 0

# See how we were called.
case "$1" in
    start)
	echo "Starting Name Switch Cache Daemon."
	nscd
	;;
    stop)
	echo -n "Stopping Name Switch Cache Daemon."
	nscd -K
	;;
  restart)
	$0 stop
	$0 start
	;;
    *)
	echo "Usage: $0 {start|stop|restart}"
	;;
esac
exit 0
