# This script runs during docker image build.
# It starts opendaylight, installs the appc features, then shuts down opendaylight.
#
-ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
+ODL_HOME=${ODL_HOME:-/opt/opendaylight}
ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U}
SDNC_HOME=${SDNC_HOME:-/opt/onap/ccsdk}
APPC_HOME=${APPC_HOME:-/opt/onap/appc}
appcInstallStartTime=$(date +%s)
-
-echo "Starting OpenDaylight"
-${ODL_HOME}/bin/start
echo "Waiting ${SLEEP_TIME} seconds for OpenDaylight to initialize"
sleep ${SLEEP_TIME}
echo "Copying a working version of the logging configuration into the opendaylight etc folder"
cp ${APPC_HOME}/data/org.ops4j.pax.logging.cfg ${ODL_HOME}/etc/org.ops4j.pax.logging.cfg
-echo "Copying a new version of aaf cadi shiro into the opendaylight deploy folder"
-cp ${APPC_HOME}/data/aaf-shiro-aafrealm-osgi-bundle.jar ${ODL_HOME}/deploy/aaf-shiro-aafrealm-osgi-bundle.jar
+#echo "Copying a new version of aaf cadi shiro into the opendaylight deploy folder"
+#cp ${APPC_HOME}/data/aaf-shiro-aafrealm-osgi-bundle.jar ${ODL_HOME}/deploy/aaf-shiro-aafrealm-osgi-bundle.jar
echo "Installing APPC platform features"
${APPC_HOME}/bin/installFeatures.sh
cp ${APPC_HOME}/data/keystore ${ODL_HOME}/etc/keystore
cp ${APPC_HOME}/data/custom.properties ${ODL_HOME}/etc/custom.properties
-echo "Stopping OpenDaylight and waiting for it to stop"
-${ODL_HOME}/bin/stop
+#echo "Stopping OpenDaylight and waiting for it to stop"
+#${ODL_HOME}/bin/stop
#The karaf command will exit when odl shuts down. This is the most reliable way to wait for opendaylight to stop
#before exiting the docker container.
-${ODL_HOME}/bin/karaf
-echo "Karaf process has stopped"
-sleep 10s
+#${ODL_HOME}/bin/client
+#echo "Karaf process has stopped"
+#sleep 10s
appcInstallEndTime=$(date +%s)
echo "Total Appc install took $(expr $appcInstallEndTime - $appcInstallStartTime) seconds"