rc.healthd 824 Bytes
Newer Older
1
#!/bin/sh
Leigh B. Stoller's avatar
Leigh B. Stoller committed
2
3
4
5
6
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# All rights reserved.
#
7
. /etc/emulab/paths.sh
8

9
NODETYPE=`${BINDIR}/nodetype`
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

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

28
		[ -x ${BINDIR}/healthd ] \
29
30
                && ${BINDIR}/healthd -f ${BINDIR}/healthd.conf -S -q -p \
		boss.emulab.net 180 \
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
                && 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