Home | History | Annotate | Download | only in ninfod
      1 #!/bin/sh
      2 
      3 NINFOD=@prefix@/sbin/ninfod
      4 PID=/var/run/ninfod.pid
      5 
      6 if ! [ -x $NINFOD ]; then
      7 	exit 0
      8 fi
      9 
     10 case "$1" in
     11     start)
     12 	echo -n "Starting node infomation daemon:"
     13 	echo -n " ninfod" ; 
     14 	$NINFOD 
     15 	echo "."
     16 	;;
     17     stop)
     18 	echo -n "Stopping node infomation daemon:"
     19 	echo -n " ninfod" ; 
     20 	kill `cat $PID`
     21 	echo "."
     22 	;;
     23     restart)
     24 	echo -n "Restarting node information daemon:"
     25 	echo -n " ninfod"
     26 	kill `cat $PID`
     27 	$NINFOD
     28 	echo "."
     29 	;;
     30     *)
     31 	echo "Usage: /etc/init.d/ninfod {start|stop|restart}"
     32 	exit 1
     33 	;;
     34 esac
     35 
     36 exit 0
     37 
     38