-
Notifications
You must be signed in to change notification settings - Fork 1
/
start.sh
executable file
·62 lines (35 loc) · 847 Bytes
/
start.sh
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/sh
source ./config.sh
if [ $# -ne 1 ]
then
echo "Usage: `basename $0` <number of servers to start>"
exit 1
fi
num_servers=$1
echo Starting $num_servers servers
echo ""
cnt=1
for server in $SERVERS
do
echo "Starting server $cnt on ${PREFIX}$server"
ssh ${PREFIX}$server "cd /home/bela/jboss/bin ; nohup ./run-standalone.sh $cnt > /dev/null 2>&1 &"
if [ $cnt -eq $num_servers ]; then
exit 1
fi
if [ $server -lt 2 ]; then
sleep 3
else
sleep 1
fi
let cnt=cnt+1
done
for server in $SECOND_SERVERS
do
echo "Starting server $cnt on ${PREFIX}$server"
ssh ${PREFIX}$server "cd /home/bela/jboss/bin ; nohup ./run-standalone2.sh $cnt > /dev/null 2>&1 &"
if [ $cnt -eq $num_servers ]; then
exit 1
fi
sleep 1
let cnt=cnt+1
done