This is a forked version of @Coal’s script to compile/update and run HiFi stack on CentOS 7 automatically via cron though there is no reason why it wouldn’t work on other flavours of Unix/Linux,
Please Note that it is complimentary to the original scripts and may not work standalone, and is not suitable for first run use on a clean system.
you can download the script locally to your server and have cron run it nightly (adjust the crontab entry to change this according to your preference)
Download the script to /root
cd /root wget https://raw.githubusercontent.com/ronlaws86/hifi-cron/master/cron-hifi.sh
Set script to be executable
chmod +x /root/chron-hifi.sh
add the following line to the crontab so it will be executed by crond
( nano /etc/crontab )
0 4 * * * root /root/cron-hifi.sh
this is set to fire off at 4am every day.
ctrl-o , return to save then ctrl-x to exit nano
Optional (and untested)
If you prefer, you can enter the cron command as a curl command directly in to the crontab instead of downloading the script and running it locally under /root though i have not tested this.
0 4 * * * root bash <(curl -Ls https://raw.githubusercontent.com/ronlaws86/hifi-cron/master/cron-hifi.sh)
the log files this script creates (for troubleshooting) are
- last_compile.log (Output of make)
- cron_log.log (Status messages with timestamps)
As always, any improvement suggestions are welcome, hope you find it useful!