forked from bahamapascal/ICCR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy-iccr.bash
executable file
·50 lines (42 loc) · 1.04 KB
/
deploy-iccr.bash
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
#!/bin/bash
ICC_PROD_DIR=~/projects/extjs/iccw/build/production/icc
if [ ! -d $dir ]; then
if [ -z "${1}" ]; then
echo "For initial deploy, pass user and group on command line"
echo You are:
id
exit
fi
if [ -z "${2}" ]; then
echo "For initial deploy, pass user and group on command line"
echo You are:
id
exit
fi
fi
user=$1
group=$2
dir=/opt
iccrdir=$dir/iccr
if [ ! -d $dir ]; then
sudo mkdir $dir
sudo chown $user:$group $dir
fi
if [ ! -d $iccrdir ]; then
sudo mkdir $iccrdir
sudo chown $user:$group $iccrdir
mkdir $iccrdir/bak
mkdir $iccrdir/bin
mkdir $iccrdir/conf
mkdir $iccrdir/data
mkdir $iccrdir/download
mkdir $iccrdir/lib
mkdir $iccrdir/logs
mkdir $iccrdir/tmp
fi
cp packager/swarm/target/iccr-swarm.jar $iccrdir/lib/iccr.jar
cp installer/property-files/src/main/resources/* $iccrdir/conf
cp installer/iccr-scripts/src/main/scripts/* $iccrdir/bin
if [ "${3}" = "icc" ]; then
cp -r ${ICC_PROD_DIR} $iccrdir/lib
fi