OpenSprinkler › Forums › OpenSprinkler Unified Firmware › Announcing OpenSprinkler Unified Firmware 2.1.3 (for AVR/RPI/BBB/LINUX) › Reply To: Announcing OpenSprinkler Unified Firmware 2.1.3 (for AVR/RPI/BBB/LINUX)
navy2x
Just wanted to give you some debug info for trying to fix the ‘Network Error’ issue. I modified your script a bit to output the time when it has to restart the OpenSprinkler program. Also, for some reason unknown to me, I was unable to login to the web interface after a restart with your script, but I was able to if I restarted it with the following command:
sudo /etc/init.d/OpenSprinkler.sh start
So I created the following script and made a cronjob to run it once a minute:
#!/bin/bash
while ! ps ax | grep -v grep | grep OpenSprinkler > /dev/null
do
echo "OpenSprinkler not running...restarting... $(date)"
/etc/init.d/OpenSprinkler.sh start
sleep 1
done
Here is my log file:
OpenSprinkler not running...restarting... Thu Apr 23 08:44:01 EDT 2015
OpenSprinkler not running...restarting... Thu Apr 23 11:31:01 EDT 2015
OpenSprinkler not running...restarting... Thu Apr 23 18:53:02 EDT 2015
OpenSprinkler not running...restarting... Thu Apr 23 19:34:02 EDT 2015
OpenSprinkler not running...restarting... Fri Apr 24 02:04:01 EDT 2015
OpenSprinkler not running...restarting... Fri Apr 24 08:57:01 EDT 2015
OpenSprinkler not running...restarting... Fri Apr 24 16:12:02 EDT 2015
Please keep in mind I had to manually restart the program at the ‘Thu Apr 23 19:34:02 EDT 2015’ timepoint.
Hope this helps.