• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh
2
3NINFOD=@prefix@/sbin/ninfod
4PID=/var/run/ninfod.pid
5
6if ! [ -x $NINFOD ]; then
7	exit 0
8fi
9
10case "$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	;;
34esac
35
36exit 0
37
38