I am trying to convert a Windows commands so that it will run on Linux I have done the first two of three but the third is giving me problems. I will bold the Windows command I am trying to change to Linux.
The scripts only create two folders but I will use to create a lot more when working
This is the Windows Instructions:
Code:
1. Create a directly c:\multiboinc and inside that create a BOINC directory (C:\multiboinc\BOINC)
2. navigate to your original Boinc folder in C:\ProgramData\BOINC and copy the file: account_www.worldcommunitygrid.org to the BOINC folder created in step 1.
3.Open a command prompt and navigate to: c:\multiboinc
4. Run this string to create the 10 new boinc folders:
FOR /L %X IN (100,1,109) DO mkdir BOINC_%X\
5. Next run this string to copy the file from step 2 into the new boinc folders:
FOR /L %X IN (100,1,109) DO copy BOINC\*.* BOINC_%X\*.*
6.Use this string to start up your new instances from the command line:
FOR /L %X IN (100,1,109) DO start "BOINC_%X" /MIN "c:\Program Files\BOINC\boinc.exe" -allow_multiple_clients -dir c:\Multiboinc\BOINC_%X -gui_rpc_port 50%X
7. Use this string to gracefully stop them all (if you need to stop them): taskkill /im boinc.exe
The folder I created is /usr/bin/multiboinc and it contains a folder called BOINC2. BOINC2 has two files called account_nci.goofyxgridathome.net.xml account_wuprop.boinc-af.org.xml
I have converted #4 to
Code:
#!/usr/bin/bash
n=100;
max=102;
while [ "$n" -le "$max" ]; do
mkdir "BOINC_$n"
n=`expr "$n" + 1`;
done
I have converted #5 to
Code:
#!/usr/bin/bash
n=100;
max=102;
while [ "$n" -le "$max" ]; do
cp BOINC2/* "BOINC_$n"
n=`expr "$n" + 1`;
done
I cannot seem to get #6 to work as I get an error
chdir: No such file or directory
chdir: No such file or directory
chdir: No such file or directory
I am using the commands from
https://boinc.berkeley.edu/wiki/Clie...d-line_options
Code:
#!/usr/bin/bash
n=100;
max=102;
while [ "$n" -le "$max" ]; do
/usr/bin/boinc --allow_multiple_clients --dir "/usr/bin/multiboinc/BOINC_%n" --gui_rpc_port 50%n
n=`expr "$n" + 1`;
done
Any help would be appreciated.
EDIT: I changed the % in #6 to a $ and it ran but only started one instance 100
/usr/bin/boinc --allow_multiple_clients --dir "/usr/bin/multiboinc/BOINC_$n" --gui_rpc_port 50$n