summaryrefslogtreecommitdiffstats
path: root/catalog-fe/src/main/resources/scripts/install.sh
blob: bed941179565aca136cb37187240e749e4957935 (plain)
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
57
58
59
60
61
#!/bin/sh

export JETTY_BASE=/home/jetty/base

COMP=$1

function usage() {
	echo "$0 <fe | be>"
}

function exitOnError() {
	if [ $1 -ne 0 ]
	then
		echo "Failed running task $2"
		exit 2
	fi
}

if [ $# -ne 1 ]
then
	usage
	exit 1

fi

/opt/app/sdc/catalog-${COMP}/scripts/installJettyBase.sh
exitOnError $? "installJettyBase"

cd ${JETTY_BASE}
exitOnError $? "move_to_base_dir"

mkdir -p scripts

cp /opt/app/sdc/catalog-${COMP}/scripts/* scripts
exitOnError $? "copy_scripts_from_rpm"

cp /opt/app/sdc/catalog-${COMP}/ext/jetty-ipaccess.xml etc
exitOnError $? "override_jetty-ipaccess_module."

cp /opt/app/sdc/catalog-${COMP}/catalog-${COMP}-*.war webapps
exitOnError $? "copy_war"

cp /opt/app/sdc/catalog-${COMP}/scripts/startJetty.sh .
exitOnError $? "copy_startJetty"

cp /opt/app/sdc/catalog-${COMP}/scripts/jvm.properties .
exitOnError $? "copy_jvm_properties"

./scripts/updateSslParams.sh ${JETTY_BASE}
exitOnError $? "updateSslParams_script"
	 
#ONLY FOR BE	 
#cp /opt/app/sdc/config/catalog-${COMP}/elasticsearch.yml config
#exitOnError $? "copy_elasticsearch_yaml_to_config"

mkdir -p ${JETTY_BASE}/config/catalog-${COMP}
cp -r /opt/app/sdc/config/catalog-${COMP}/*.xml ${JETTY_BASE}/config/catalog-${COMP}
exitOnError $? "copy_xml_files_to_config"

cp -r /opt/app/sdc/config/catalog-${COMP}/*.yaml ${JETTY_BASE}/config/catalog-${COMP}
exitOnError $? "copy_yaml_files_to_config"