X-Git-Url: https://git.rvb.name/weathermon.git/blobdiff_plain/aa93d9c75aad23c01d984b780adf5e0ef4435bb1..0a2693126165f68131a1d1686a2bee1f1967494d:/bin/weather-watchdog?ds=sidebyside diff --git a/bin/weather-watchdog b/bin/weather-watchdog new file mode 100644 index 0000000..4847477 --- /dev/null +++ b/bin/weather-watchdog @@ -0,0 +1,10 @@ +#!/bin/sh + +stamp=`date +%s -r $(uci get weathermon.process.dump_file)` +now=`date +%s` +delta=$(( $now - $stamp )) +if [[ $delta -ge 300 ]]; then + /etc/init.d/weathermon restart +fi + +pgrep weather-display > /dev/null || /etc/init.d/weather-display restart