summaryrefslogtreecommitdiff
path: root/ninfod/ninfod.sh.in
blob: 4c5e6b57a75ac01bb2f68f68e6cec2788ef4bd18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh

NINFOD=@prefix@/sbin/ninfod
PID=/var/run/ninfod.pid

if ! [ -x $NINFOD ]; then
	exit 0
fi

case "$1" in
    start)
	echo -n "Starting node infomation daemon:"
	echo -n " ninfod" ; 
	$NINFOD 
	echo "."
	;;
    stop)
	echo -n "Stopping node infomation daemon:"
	echo -n " ninfod" ; 
	kill `cat $PID`
	echo "."
	;;
    restart)
	echo -n "Restarting node information daemon:"
	echo -n " ninfod"
	kill `cat $PID`
	$NINFOD
	echo "."
	;;
    *)
	echo "Usage: /etc/init.d/ninfod {start|stop|restart}"
	exit 1
	;;
esac

exit 0