cluster-status.sh.in 768 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
#!/bin/sh

# PROVIDE: cluster-status
# REQUIRE: NETWORKING
# BEFORE: apache22
# KEYWORD: nojail shutdown

logfile=@prefix@/log/cluster-status.log

case "$1" in
    start|faststart|quietstart|onestart|forcestart)
	if [ -x @prefix@/sbin/daemon_wrapper ]; then
	    echo -n " cluster-status wrapper"
	    @prefix@/sbin/daemon_wrapper -n cluster-status -l $logfile \
		@prefix@/sbin/cluster-status
	else
	    @prefix@/sbin/cluster-status >$logfile 2>&1 &
	    echo "$!" > /var/run/cluster-status_wrapper.pid
	fi
	;;
    stop|faststop|quietstop|onestop|forcestop)
	if [ -r /var/run/cluster-status_wrapper.pid ]; then
	    kill `cat /var/run/cluster-status_wrapper.pid`
	fi
	;;
    *)
	echo ""
	echo "Usage: `basename $0` { start | stop }"
	echo ""
	exit 64
	;;
esac
exit 0