#!/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