Auto restart Weewx if SubState=exited
Contents
I have a personal weather station server running on Weewx, which posts weather data to https://kvw.gr. I have a cron job that stops Weewx for 20 minutes before midnight to allow the Weatherlink IP interface to upload daily data to weatherlink.com. However, in some cases Weatherlink IP interface was busy posting to weatherlink.com during Weewx’s start-up phase, causing Weewx to be unable to connect and retrieve LOOP data. This results in Weewx staying in this state until I manually restart the service.
To resolve this issue, I have created a simple bash script that checks the running status of Weewx and automatically restarts it if it is in an “exited” status. This script is run every 30 minutes through a cron schedule.
|
|