-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployConfiguration.sh
52 lines (44 loc) · 1.04 KB
/
deployConfiguration.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
#!/bin/bash
env=$1
middle="rhgemfirev"
locatorMiddle="rhlocatorv"
if [ $env == "sbx" ]; then
env="sb"
max=3
locatorNo=1
elif [ $env == "dev" ]; then
max=6
locatorNo=2
elif [ $env == "sit" ]; then
max=12
locatorNo=2
elif [ $env == "uat" ]; then
max=19
locatorNo=2
elif [ $env == "prod" ]; then
max=21
locatorNo=2
middle="rhgfxdv"
fi
#dir=`pwd`
#echo $dir
if [ ! -f "gemfire-server" ]; then
echo "There is no such file named gemfire-server"
else
for i in $(seq 1 $max)
do
echo $env$middle$i
scp "gemfire-server" $env$middle$i":/etc/init.d/gemfire-server"
#scp "Pivotal_GemFireXD_14111_4e1aad3_Linux.tar.gz" $env$middle$i":/tmp/"
done
fi
if [ ! -f "gemfire-locator" ]; then
echo "There is no file named gemfire-locator "
else
for i in $(seq 1 $locatorNo)
do
echo $env$locatorMiddle$i
scp "gemfire-locator" $env$locatorMiddle$i":/etc/init.d/gemfire-locator"
#scp "Pivotal_GemFireXD_14111_4e1aad3_Linux.tar.gz" $env$middle$i":/tmp/"
done
fi