#!/bin/sh

VERSION=2

case "$1" in
	start)
		if [ -f "/usr/local/sbin/watchdog-service" ]; then
			echo "Starting watchdog service..."
			start-stop-daemon -S -b -x /usr/local/sbin/watchdog-service
		fi	
		;;
	stop)
		echo "Stopping watchdog service..."
		killall -9 watchdog-service
		;;
	*)
		echo "Usage: $0 {start|stop}" >&2
		exit 1
		;;
esac
