[Debian Wiki] Update of "BOINC/ServerGuide/Initialisation" by SteffenMoeller

Debian Wiki debian-www at lists.debian.org
Wed Nov 12 10:16:10 UTC 2014


Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Debian Wiki" for change notification.

The "BOINC/ServerGuide/Initialisation" page has been changed by SteffenMoeller:
https://wiki.debian.org/BOINC/ServerGuide/Initialisation?action=diff&rev1=21&rev2=22

Comment:
Abstracted vom boinc_test.conf

  ==== Initialisation of the configuration ====
  
  For a first start of a project create the file that the project parameters shall be stored in. {{{
- touch ~/.boinc_test.conf
+ echo "boincserverconfig=~/.boinc_test.conf" > ~/.boinc_test.conf
  chmod 600 ~/.boinc_test.conf
  }}}
  and whenever starting a shell, these settings should be set, so you may decide to have an account dedicated for your project and have the configration sourced immediately after the shell was started, e.g. for BASH like: {{{
  cat >> ~/.bashrc <<EOBASHRC
- if [ -r ~/.boinc_test.conf ]; then
+ if [ -r "$boincserverconfig" ]; then
     . ~/.boinc_test.conf
  fi
  EOBASHRC
@@ -63, +63 @@

  ==== Parameters for the MySQL database ====
  
  {{{
- cat << EODBCONFIG >> ~/.boinc_test.conf
+ cat << EODBCONFIG >> $boincserverconfig
  # name of the MySQL database
  dbname=boinctest
  # name of the MySQL user with access to above database
@@ -79, +79 @@

  
  With the variables defined before, you can just copy and pasted the code below. The password asked is the password for the root user to access the database, which is not unlikely to differ from the root password to your UNIX system. {{{
  # read config if available
- [ -r ~/.boinc_test.conf ] && . ~/.boinc_test.conf
+ [ -r "$boincserverconfig" ] && . $boincserverconfig
  if   [ -z "$dbuser" ]; then echo "Variable 'dbuser' not set";
  elif ! echo "DROP USER '$dbuser'@'localhost'" | mysql -u root -p; then
     echo "If the removal of the previous user fails because the user is not existing, then this does not matter. Other errors please investigate."
@@ -106, +106 @@

  
  Please replace a.b.c.d with your full hostname or your server's IP address. If you only have dynamic IP addresses, then this is unfortunate, but investigate the service of dyndns.org to help out.
  {{{
- cat <<EOCONF >> ~/.boinc_test.conf
+ cat <<EOCONF >> $boincserverconfig
  # address of host (via DNS or IP number) at which project server shall be reached
  hosturl=http://a.b.c.d
  # name of folder in which data shall be stored, also becomes part of project URL
@@ -123, +123 @@

  have that directory cleaned at boot time. Please adjust for permanent location.
  
  So, to make sure you have indeed sourced the configuration paramters: {{{
- if [ ! -r  ~/.boinc_test.conf ]; then
+ if [ ! -r "$boincserverconfig" ]; then
-   echo "Configuration file '~/.boinc_test.conf' not existing."
+   echo "Configuration file '$boincserverconfig' not existing."
  else
-   . ~/.boinc_test.conf
+   . $boincserverconfig
    echo -n "Basic configuration test: "
    if [ -z "$installroot" -o -z "$hosturl" -o -z "$dbname" -o -z "$dbpasswd" \
      -o -z "$projectnicename" -o -z "$projectname" ] ; then
@@ -183, +183 @@

  ==== Adjusting permissions for project directory ====
  
   1. Make sure the configuration variables are set {{{
- [ -r ~/.boinc_test.conf ] && . ~/.boinc_test.conf
+ [ -r $boincserverconfig ] && . $boincserverconfig
  }}}
   1. Change files and directories permission: {{{
  if [ -z "$installroot" -o -z "$projectname" ]; then
@@ -351, +351 @@

  
  As an example may serve the initialisation of the news. The screen shot shows it, where there should be the latest project news, there is a mere suggestion, reading "No news forum. Run html/ops/create_forums.php". To follow that advice, on the command line
  {{{
- [ -r ~/.boinc_test.php ] && . ~/.boinc_test.php
+ [ -r "$boincserverconfig" ] && . $boincserverconfig
  
  if [ ! -r create_forums.php ]; then
      if [ -r html/ops/create_forums.php ]; then 



More information about the pkg-boinc-commits mailing list