Message boards : Server programs : anyone who knows "bash: $boincserverconfig: ambiguous redirect" ??? hlep me
Message board moderation
Author | Message |
---|---|
Send message Joined: 4 Aug 17 Posts: 4 |
https://wiki.debian.org/BOINC/ServerGuide/Initialisation i install the boinc server on ubuntu 16.04LTS... i install the php5.6 than php5. everything goings well but, when i enter the section 1.3.1 Create and config Boinc project, step 1 echo "boincserverconfig=~/.boinc_test.conf" > ~/.boinc_test.conf chmod 600 ~/.boinc_test.conf ----------------------------->ok step 2 cat >> ~/.bashrc <<EOBASHRC if [ -r "$boincserverconfig" ]; then . $boincserverconfig fi EOBASHRC ------------------------------>ok step 3 cat << EODBCONFIG >> $boincserverconfig # name of the MySQL database dbname=boinctest # name of the MySQL user with access to above database dbuser=boincadm # password for write access to your project database dbpasswd=MYSQLPASSWORDFORBOINCUSER EODBCONFIG----------------------------> get " bash: $boincserverconfig: ambiguous redirect " and then step 4 # read config if available [ -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." fi ----------------------------------> get dbuser is empty... i don't know what i must do.. give me the light please T_T... |
Send message Joined: 4 Jul 12 Posts: 321 |
If you want to use the settings stored in ~/.boinc_test.conf immediately you need to source the file to your active shell. What you did in step 2 will only source the file at login. So step 2.a would be: source ~/.boinc_test.conf Looking at it some more it seems step 2 is flawed. It is trying to pull itself out of the mud on its own hair. The variable $boincserverconfig is only available if ~/.boinc_test.conf was sourced but it is only sourced if $boincserverconfig is available. I send an email to the person that created the boinc-server-package and should know about that. |
Send message Joined: 20 Jul 09 Posts: 6 |
Right. The variable $boincserverconfig names the file that hosts the server configuration. And that variable is set in that file. The idea behind that is that you could have several servers set up at different locations but the tutorial here just always knows where you have that configuration and can talk about that file by using that variable. At some point in my life the tutorial went just fine. But that is some 2.5 years ago. And apparently I had executed the ". ~/.boinc_test.conf" after I had created it :) The step with the failing if just appends to the .bashrc . The $boincserverconfig variable is substituted when executing that command and the -r only tests if that file exists. Sorry for that. It is a bit confusing at a first sight. And many thanks for pointing out that there was this one line missing. I have added it to the wiki in the mean time. Good luck downstream from here. |
Send message Joined: 4 Aug 17 Posts: 4 |
i am sorry to late for your reply. i did you told me, it worked! i wish your everything goes well. really thank you bro! |
Send message Joined: 4 Aug 17 Posts: 4 |
ChristianB, i am sorry to late for your reply. |
Send message Joined: 4 Aug 17 Posts: 4 |
thank you smoe! i could start my project by your dutorial! |
Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License,
Version 1.2 or any later version published by the Free Software Foundation.