| 1 | #!/bin/bash |
| 2 | # Description: Script to start boinc as a service in DRBL client. |
| 3 | # Author: Steven Shiau <steven _at_ clonezilla org> |
| 4 | # License: GPL |
| 5 | |
| 6 | # Load the setting |
| 7 | . /opt/BOINC/conf/drbl-boinc.conf |
| 8 | |
| 9 | # |
| 10 | export PATH=$PATH:$BOINC_DIR |
| 11 | |
| 12 | if ! mount -t tmpfs -o size="$RAMDISK_SIZE" none $workzone; then |
| 13 | echo "Unable to mount tmpfs working zone! Abort!" |
| 14 | exit 1 |
| 15 | fi |
| 16 | |
| 17 | echo "Running BOINC..." |
| 18 | su -c "/opt/BOINC/run-as-user" -l $USERNAME |