Catalog alignment

Issue-ID: SDC-2724
Signed-off-by: ys9693 <ys9693@att.com>
Change-Id: I52b4aacb58cbd432ca0e1ff7ff1f7dd52099c6fe
diff --git a/catalog-be/sdc-backend/startup.sh b/catalog-be/sdc-backend/startup.sh
index 77d4dd5..e41aff4 100644
--- a/catalog-be/sdc-backend/startup.sh
+++ b/catalog-be/sdc-backend/startup.sh
@@ -1,20 +1,31 @@
 #!/bin/sh
 
-JAVA_OPTIONS=" ${JAVA_OPTIONS} \
-               -Dconfig.home=${JETTY_BASE}/config -Dlog.home=${JETTY_BASE}/logs \
-               -Dlogback.configurationFile=${JETTY_BASE}/config/catalog-be/logback.xml \
-               -Dconfiguration.yaml=${JETTY_BASE}/config/catalog-be/configuration.yaml \
-               -Donboarding_configuration.yaml=${JETTY_BASE}/config/onboarding-be/onboarding_configuration.yaml \
-               -Djavax.net.ssl.trustStore=${JETTY_BASE}/etc/org.onap.sdc.trust.jks \
-               -Djavax.net.ssl.trustStorePassword=].][xgtze]hBhz*wy]}m#lf* \
-               -Djetty.console-capture.dir=${JETTY_BASE}/logs"
+export JAVA_OPTIONS=" -Dconfig.home=${JETTY_BASE}/config \
+       -Dlog.home=${JETTY_BASE}/logs \
+       -Dlogback.configurationFile=${JETTY_BASE}/config/catalog-be/logback.xml \
+       -Dconfiguration.yaml=${JETTY_BASE}/config/catalog-be/configuration.yaml \
+       -Dartifactgenerator.config=${JETTY_BASE}/config/catalog-be/Artifact-Generator.properties \
+	   -Donboarding_configuration.yaml=${JETTY_BASE}/config/onboarding-be/onboarding_configuration.yaml \
+       -Djavax.net.ssl.trustStore=${JETTY_BASE}/etc/org.onap.sdc.trust.jks \
+       -Djavax.net.ssl.trustStorePassword=].][xgtze]hBhz*wy]}m#lf* \
+       -Djetty.console-capture.dir=${JETTY_BASE}/logs \
+       ${JAVA_OPTIONS} "
 
 cd /root/chef-solo
 chef-solo -c solo.rb -E ${ENVNAME}
 
+status=$?
+if [ $status != 0 ]; then
+    echo "[ERROR] Problem detected while running chef. Aborting !"
+    exit 1
+fi
+
+# Execute Jetty
 cd /var/lib/jetty
 /docker-entrypoint.sh &
 
+exec "$@";
+
 while true; do sleep 2; done