#!/bin/sh
# Starts and stops rpc.mountd
#
### BEGIN INIT INFO
# Provides:          WLANThermoWD
# Required-Start:    
# Required-Stop:     
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Startet WLANThermo Watchdog
# Description:       Startet WLANThermo Watchdog 
### END INIT INFO

case "$1" in
start)

    python /usr/sbin/wlt_2_watchdog.py >/dev/null &
    echo "Starting WLAN Thermometer watchdog"    

;;

stop)
    
    kill $(ps aux|grep "wlt_2_watchdog.py"| grep -v grep |awk '{print $2}')
    echo "Stopping WLAN Thermometer watchdog"

;;

restart)
    $0 stop
    $0 start
;;

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