Closed JonTheNiceGuy closed 6 years ago
For the short-term, I have copied into the testsite path the update_site script, and tweaked it to change "$HOME" for "BASEDIR". I've then created a crontab entry for root, showing the following:
*/5 * * * * BASEDIR=/home/groups/testsite.lug.org.uk /home/groups/testsite.lug.org.uk/update_site 2>&1 | mail jon@sprig.gs -E -s update_site testsite.lug.org.uk
This will tide us over for the next few days, until I figure out something a little more permanant!
Considering using this instead: https://github.com/JonTheNiceGuy/git-autoupdate - thoughts?
Sounds perfect.
Code from oggcamp's hosting is to have a script in $HOME with the following content:
This then is scheduled via crontab, however, if there's any reason you can't reach the origin (via git pull) then it gets noisy very quickly. We could do with some sort of failure detection and threshold. Perhaps this untested bash script (to replace the single "git fetch origin" line above) covers it?