OpenSprinkler › Forums › OpenSprinkler Mobile and Web App › Update Function & Button
Should we try to create an “Update” button in device settings under “Reboot Open Sprinkler” and a function that runs a git pull?
I just tried to implement something like this and ran into every obstacle outlined in this blog post (in this order): http://jondavidjohn.com/blog/2012/10/git-pull-from-a-php-script-not-so-simple
So, I have another idea. We already have a script in crontab running every minute, watcher.php. So, I can add an option to automatically install updates and have the watcher install them periodically. But, do I need to expose this as an option or would everyone be okay if this just happened? I would first do a `which git` for the binary location and if nothing is found abort there. I would then check the install location for a .git/HEAD file and if missing abort. The only issue would be a bad update but nothing that could possibly break git pull from updating/fixing itself.
Let me know what you think and we can easily implement something like I mentioned.
I see.. you can make an external script that php calls but too many variables and a few security holes to make.
Using the weather and making it an option would work. I definitely would want to choose to auto update or not and or perhaps choose to have the system report the need for an update?
In lieu of a manual “Install update” button, I’d be ok with the auto update and config option to disable as mentioned above. When an update is auto installed a quick msg popup – like the “Update available” – msg indicating that an “Update installed” would be good as a prompt to go and check out a description of the update..!
OpenSprinkler › Forums › OpenSprinkler Mobile and Web App › Update Function & Button