-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmultipleMining
executable file
·58 lines (42 loc) · 1.07 KB
/
multipleMining
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
################################################################################
### SCRIPT_DIR is the location the script
SCRIPT_DIR="`dirname \"$0\"`" # relative
SCRIPT_DIR="`( cd \"$SCRIPT_DIR\" && pwd )`" # absolutized and normalized
if [ -z "$SCRIPT_DIR" ] ; then
# error; for some reason, the path is not accessible
# to the script (e.g. permissions re-evaled after suid)
exit 1 # fail
fi
source $SCRIPT_DIR/FUNCTIONS
################################################################################
#trap ctrl_c INT
usage ()
{
cat << EOF
usage: $0 config_file
This script launch several miners on different cards
example format of config file:
3 GBX
4 ZCL
will launch GBX miner on first 3 cards, followed by ZCL miner on 4 cards
EOF
}
function ctrl_c()
{
echo "Terminating..."
exit 0
}
if [ -z "$1" ]; then
usage
exit 1
fi
#while :
index=0
while read line;
do
stringarray=($line)
devices=$(devices_with_coma $index ${stringarray[0]})
launch_miner ${stringarray[1]} $devices 1
index=`expr $index + ${stringarray[0]}`
done < $1