boinc: new package for distributed computing/data acquisition

Compile tested: x86_64, OpenWrt master
Run tested: arm/mvebu

Signed-off-by: Christian Dreihsig <christian.dreihsig@t-online.de>
This commit is contained in:
Christian Dreihsig
2020-04-05 09:34:03 +02:00
committed by Paul Spooren
parent d6239f87d7
commit 9c2bd865c7
4 changed files with 138 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
#!/bin/sh /etc/rc.common
USE_PROCD=1
BOINCEXE_NAME=boinc_client
BOINCDIR=/opt/boinc/
BOINCUSR=boinc
BOINCEXE_OPTS="--check_all_logins --redirectio --dir $BOINCDIR"
PID_FILE="var/run/$BOINCEXE_NAME.pid"
start_service() {
# First Check that BOINCDIR exists...
if ! [ -d "$BOINCDIR" ]; then
if ! mkdir -p $BOINCDIR 2>/dev/null ; then
echo "ERROR: $BOINCDIR doesn't exist and couldn't be created"
return 1
fi
fi
# ... and that it is accessible by boinc
BOINCDIR_OWNER="$(ls -ld $BOINCDIR | awk '{print $3}')"
if [ "$BOINCUSR" != "$BOINCDIR_OWNER" ] ; then
chown -R $BOINCUSR:$BOINCUSR $BOINCDIR
BOINCDIR_OWNER="$(ls -ld $BOINCDIR | awk '{print $3}')"
if [ "$BOINCUSR" != "$BOINCDIR_OWNER" ] ; then
echo "User boinc can't access $BOINC_DIR"
return 3
fi
fi
# now use procd to start boinc
procd_open_instance $BOINCEXE_NAME
procd_set_param command $BOINCEXE_NAME
procd_append_param command $BOINCEXE_OPTS
procd_set_param user $BOINCUSR
procd_set_param limits core="unlimited"
procd_set_param stdout 1
procd_set_param stderr 1
procd_set_param pidfile $PID_FILE
procd_close_instance
}
@@ -0,0 +1,4 @@
<global_preferences>
<max_ncpus_pct>50.000000</max_ncpus_pct>
<disk_interval>21600.000000</disk_interval>
<global_preferences>
+8
View File
@@ -0,0 +1,8 @@
# This file contains a list of hostnames or IP addresses (one per line)
# of remote hosts, that are allowed to connect and to control the local
# BOINC core client via GUI RPCs.
# Lines beginning with a # or a ; are treated like comments and will be
# ignored.
#
#host.example.com
#192.168.0.180