4f5ef8ca2e8d7fe1c9978de26feabd410ef14ffa
[sdc.git] / catalog-be / sdc-backend / startup.sh
1 #!/bin/sh
2
3 export JAVA_OPTIONS=" -Dconfig.home=${JETTY_BASE}/config \
4        -Dlog.home=${JETTY_BASE}/logs \
5        -Dlogback.configurationFile=${JETTY_BASE}/config/catalog-be/logback.xml \
6        -Dconfiguration.yaml=${JETTY_BASE}/config/catalog-be/configuration.yaml \
7        -Dartifactgenerator.config=${JETTY_BASE}/config/catalog-be/Artifact-Generator.properties \
8            -Donboarding_configuration.yaml=${JETTY_BASE}/config/onboarding-be/onboarding_configuration.yaml \
9        -Djavax.net.ssl.trustStore=${JETTY_BASE}/etc/org.onap.sdc.trust.jks \
10        -Djavax.net.ssl.trustStorePassword=z+KEj;t+,KN^iimSiS89e#p0 \
11        -Djetty.console-capture.dir=${JETTY_BASE}/logs \
12        ${JAVA_OPTIONS} "
13
14 cd /var/lib/jetty/chef-solo
15 chef-solo -c solo.rb -E ${ENVNAME}
16
17 status=$?
18 if [ $status != 0 ]; then
19     echo "[ERROR] Problem detected while running chef. Aborting !"
20     exit 1
21 fi
22
23 # Execute Jetty
24 cd /var/lib/jetty
25 /docker-entrypoint.sh &
26
27 exec "$@";
28
29 while true; do sleep 2; done
30
31
32