#!/bin/sh /etc/rc.common
# Description: Detects and post to the server about network and power failures

START=98                              				# this process should be one of the last to be launched
STOP=1                                				# this process should be one of the firts to be killed
DAEMON_PATH="/usr/local/allshoppings-cportal/g-watchdogd" 	# path of the daemon executable

# run the daemon in background
start() {
    echo [GetIn Watchdog] Starting service ...
    start-stop-daemon -b -S -x ${DAEMON_PATH}
    echo [GetIn Watchdog] done
}

# stop the sensor daemon
stop() {
    echo [GetIn Watchdog] Stopping service ...
    start-stop-daemon -K -s KILL -n $(basename ${DAEMON_PATH})
    killall -9 ssh
    echo [GetIn Watchdog] done
}

