Skip to content

Instantly share code, notes, and snippets.

@DosAmp
Created May 2, 2011 11:41
Show Gist options
  • Save DosAmp/951489 to your computer and use it in GitHub Desktop.
Save DosAmp/951489 to your computer and use it in GitHub Desktop.
Auto-updater cron script for BOINC projects
#!/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