# openECOMP : SDN-C
# ================================================================================
# Copyright (C) 2017 AT&T Intellectual Property. All rights
-# reserved.
+# reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
SLEEP_TIME=${SLEEP_TIME:-120}
MYSQL_PASSWD=${MYSQL_PASSWD:-openECOMP1.0}
+
#
# Wait for database
#
if [ ! -f ${CCSDK_HOME}/.installed ]
then
- echo "Installing SDN-C database"
- ${CCSDK_HOME}/bin/installSdncDb.sh
- echo "Starting OpenDaylight"
- ${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
- if [ -x ${CCSDK_HOME}/svclogic/bin/install.sh ]
- then
- echo "Installing directed graphs"
- ${CCSDK_HOME}/svclogic/bin/install.sh
- fi
-
+ echo "Installing SDN-C database"
+ ${CCSDK_HOME}/bin/installSdncDb.sh
+ echo "Starting OpenDaylight"
+ ${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
+ 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 ${SLEEP_TIME} seconds for OpenDaylight to stop"
- sleep ${SLEEP_TIME}
- echo "Installed at `date`" > ${CCSDK_HOME}/.installed
+ 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
fi
-exec ${ODL_HOME}/bin/karaf server
+exec ${ODL_HOME}/bin/karaf