rc.healthd 695 Bytes
Newer Older
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
38
39
#!/bin/sh

PREFIX=/etc/testbed
NODETYPE=`${PREFIX}/nodetype`

case "$1" in
	start)
	case "$NODETYPE" in
	    pc850)
		#
		# Nothing special to do
		#
		;;
	    *)
	    	#
		# Not supported
		#
		echo "Health monitoring not supported on nodetype: $NODETYPE"
		exit 1
		;;
	esac

		[ -x ${PREFIX}/healthd ] \
                && ${PREFIX}/healthd -f ${PREFIX}/healthd.conf -S -q -p boss 180 \
                && echo -n ' healthd'
		;;
	stop)
		/usr/bin/killall healthd > /dev/null 2>&1 && echo -n ' healthd'
		;;
	reload)
		/usr/bin/killall -HUP healthd > /dev/null 2>&1 && echo -n ' healthd'
		;;
	*)
		echo ""
		echo "Usage: `basename $0` { start | stop | reload }"
		echo ""
		exit 1
		;;
esac