Mark,

WeeWX should not crash. If it does, it's a bug. I have successfully run it
for 2 years at a time.

The next time it does, please post the system log. Far better to engineer
out the point of failure.

-tk

On Sat, Feb 23, 2019 at 7:36 AM Mark Jenks <[email protected]> wrote:

> 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.
>

-- 
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