#!/bin/sh

# init hardware watchdog

start() {
    /usr/local/bin/hw_version.sh
    /usr/local/bin/watchdog_feed.sh
}

stop() {
    echo "stop..."
    sync
    /usr/local/bin/watchdog_reboot.sh
}

case "$1" in
    start)
        start
        ;;
    stop)
        stop
        ;;
    restart|reload)
        stop
        start
        ;;
    *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
esac

exit $?

