Created
May 2, 2011 11:41
-
-
Save DosAmp/951489 to your computer and use it in GitHub Desktop.
Auto-updater cron script for BOINC projects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# /etc/cron.hourly/boinc-update: forces all BOINC projects to update regularly | |
RPC_AUTH_FILE=/var/lib/boinc-client/gui_rpc_auth.cfg | |
# sometimes: RPC_AUTH_FILE=/var/lib/boinc/gui_rpc_auth.cfg | |
# in Debian: RPC_AUTH_FILE=/etc/boinc-client/gui_rpc_auth.cfg | |
RPC_AUTH= | |
if [ -r $RPC_AUTH_FILE ] && [ -s $RPC_AUTH_FILE ]; then | |
RPC_AUTH=`cat $RPC_AUTH_FILE` | |
fi | |
while read PROJECT_URL; do | |
if [ -n $RPC_AUTH ]; then | |
/usr/bin/boinccmd --passwd "$RPC_AUTH" --project "$PROJECT_URL" update | |
else | |
/usr/bin/boinccmd --project "$PROJECT_URL" update | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment