X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=odlsli%2Fsrc%2Fmain%2Fscripts%2FstartODL.sh;h=4d608577232dbf2e6f8e16849a86900291a6c7ca;hb=47d703698414dbdb160a7e86c728df3ce0a752cb;hp=6b42937c0801a68975ee66ab1be55ff203d6db1c;hpb=492bd3a6bf1d3885a0826d2681be7802c495d90e;p=ccsdk%2Fdistribution.git diff --git a/odlsli/src/main/scripts/startODL.sh b/odlsli/src/main/scripts/startODL.sh index 6b42937c..4d608577 100644 --- a/odlsli/src/main/scripts/startODL.sh +++ b/odlsli/src/main/scripts/startODL.sh @@ -24,11 +24,12 @@ # Install SDN-C platform components if not already installed and start container -ODL_HOME=${ODL_HOME:-/opt/opendaylight/current} +ODL_HOME=${ODL_HOME:-/opt/opendaylight} ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U} CCSDK_HOME=${CCSDK_HOME:-/opt/onap/ccsdk} SLEEP_TIME=${SLEEP_TIME:-120} MYSQL_PASSWD=${MYSQL_PASSWD:-openECOMP1.0} +INSTALLED_DIR=${INSTALLED_FILE:-/opt/opendaylight/current/daexim} # @@ -42,28 +43,23 @@ do done echo -e "\nmysql ready" -if [ ! -f ${CCSDK_HOME}/.installed ] +if [ ! -d ${INSTALLED_DIR} ] +then + mkdir -p ${INSTALLED_DIR} +fi + +if [ ! -f ${INSTALLED_DIR}/.installed ] then echo "Installing SDN-C database" ${CCSDK_HOME}/bin/installSdncDb.sh - echo "Starting OpenDaylight" - ${CCSDK_HOME}/bin/installOdlHostKey.sh - ${ODL_HOME}/bin/start - echo "Waiting ${SLEEP_TIME} seconds for OpenDaylight to initialize" - sleep ${SLEEP_TIME} - echo "Installing SDN-C platform features" - ${CCSDK_HOME}/bin/installFeatures.sh + # echo "Installing OpenDaylight host key" + # ${CCSDK_HOME}/bin/installOdlHostKey.sh if [ -x ${CCSDK_HOME}/svclogic/bin/install.sh ] then echo "Installing directed graphs" ${CCSDK_HOME}/svclogic/bin/install.sh fi - - echo "Restarting OpenDaylight" - ${ODL_HOME}/bin/stop - echo "Waiting 60 seconds for OpenDaylight stop to complete" - sleep 60 - echo "Installed at `date`" > ${CCSDK_HOME}/.installed + echo "Installed at `date`" > ${INSTALLED_DIR}/.installed fi -exec ${ODL_HOME}/bin/karaf +exec ${ODL_HOME}/bin/karaf server