I've been running this for a few years now, and once and awhile weewx just 
falls over for no good reason.   To deal with this, I wrote a script that I 
run in cron to check to make sure it's running, and if not, start it over 
again.

Here it is for everyone to use....

-Mark

[root@server bin]# crontab -l
0 * * * * /usr/local/bin/watch-weewx.sh


[root@server bin]# cat watch-weewx.sh
#!/bin/bash
service=weewx.service
if (( $(/usr/bin/systemctl status $service | grep running | wc -l) < 1 ))
then
        echo “$service was down and was restarted!!!”
        systemctl stop $service
        systemctl start $service
fi
if (( $(/usr/bin/systemctl status $service | grep "Exiting..." | wc -l) > 0 
))
then
        echo “$service Exited and was restarted!!!”
        systemctl stop $service
        systemctl start $service
fi

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to