#!/bin/sh
# Start the openSLP daemon

start() {
	echo -n "Starting slpd: "


	if [ -f /tmp/slp.reg ];
	then
   		/usr/sbin/slpd -r /tmp/slp.reg	
	else
		echo "Warning -- slp.reg does not exist"   		
	
	fi
	echo "OK"
}	

stop() {
	echo -n "Stoping slpd: "
	/usr/bin/killall slpd
	echo "OK"
}

restart() {
	stop
	sleep 1
	start
}	

case "$1" in
  start)
  	start
	;;
  stop)
  	stop
	;;
  restart|reload)
  	restart
	;;
  *)
	echo $"Usage: $0 {start|stop|restart}"
	exit 1
esac
