Debian Codegraph @

setup/files/boinc/run-as-user

raw symbols SCIP
1 #!/bin/bash
2 # Description: Script to run boinc in DRBL client.
3 # Author: Steven Shiau <steven _at_ clonezilla org>
4 # License: GPL
5
6 # Load settings
7 . /opt/BOINC/conf/drbl-boinc.conf
8
9 #
10 export PATH=$PATH:$BOINC_DIR
11
12 if ! mountpoint $workzone &>/dev/null; then
13 echo "tmpfs working dir is not found."
14 echo "Program terminated!"
15 exit 1
16 fi
17
18 cd $workzone
19 # We need 3 files
20 cp -f $BOINC_DIR/template/ca-bundle.crt .
21 cp -f $BOINC_DIR/template/account_www.worldcommunitygrid.org.xml.template account_www.worldcommunitygrid.org.xml
22 cp -f $BOINC_DIR/template/global_prefs.xml.template global_prefs.xml
23
24 # The key in account_www.worldcommunitygrid.org.xml is like:
25 # <authenticator>7294d1ee005bf25b0c46f27330c54326</authenticator>
26 perl -pi -e "s|(^[[:space:]]*\<authenticator\>).*(\</authenticator\>)|\$1 ${BOINC_Account_Key}\$2|g" $workzone/account_www.worldcommunitygrid.org.xml
27
28 # Run it as daemon. The outout will be stderrdae.txt & stdoutdae.txt
29 boinc -no_gui_rpc -daemon