remove preset idmlight from sdnc 33/118033/3
authorMichael DÜrre <michael.duerre@highstreet-technologies.com>
Thu, 18 Feb 2021 12:35:19 +0000 (13:35 +0100)
committerMichael DÜrre <michael.duerre@highstreet-technologies.com>
Fri, 19 Feb 2021 09:14:59 +0000 (10:14 +0100)
remove odl userdb to init with env var

Issue-ID: SDNC-1483
Signed-off-by: Michael DÜrre <michael.duerre@highstreet-technologies.com>
Change-Id: Ib79a669a80f2c53cd29fe75b91c0e992a9e5ca30
Signed-off-by: Michael DÜrre <michael.duerre@highstreet-technologies.com>
Former-commit-id: 06ff1bc6d69d655a03563cc9f9b12500050f980c

installation/sdnc/src/main/scripts/startODL.sh

index 5e294dd..81e6d7f 100755 (executable)
@@ -213,6 +213,13 @@ ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
 ODL_FEATURES_BOOT_FILE=$ODL_HOME/etc/org.apache.karaf.features.cfg
 
 ODL_ADMIN_USERNAME=${ODL_ADMIN_USERNAME:-admin}
+ODL_REMOVEIDMDB=${ODL_REMOVEIDMDB:-true}
+
+if $ODL_REMOVEIDMDB ; then
+  if [ -f $ODL_HOME/data/idmlight.db.mv.db ]; then 
+    rm $ODL_HOME/data/idmlight.db.mv.db
+  fi
+fi
 # do not start container if ADMIN_PASSWORD is not set
 if [ -z "$ODL_ADMIN_PASSWORD" ]; then
   echo "ODL_ADMIN_PASSWORD is not set"