Adapt lighty to run with optional karaf features
[transportpce.git] / lighty / src / main / assembly / resources / clean-start-controller.sh
index ad4926ddc42df34c97dfae4afc89f5c037ac02a8..89907be25460efee9a10184ae8a99751983ab803 100755 (executable)
@@ -27,10 +27,26 @@ if [ -z "$USE_ODL_ALT_AKKA_MGT_PORT" ]; then
 else
     AKKA_MGT_PORT=$USE_ODL_ALT_AKKA_MGT_PORT
 fi
+if [ -z "$OLM_TIMER1" ]; then
+    olmtimer1=3000
+else
+    olmtimer1=$OLM_TIMER1
+fi
+if [ -z "$OLM_TIMER2" ]; then
+    olmtimer2=2000
+else
+    olmtimer2=$OLM_TIMER2
+fi
+if [ -n "$INSTALL_NBINOTIFICATIONS" ]  && [ "$INSTALL_NBINOTIFICATIONS" = "True" ]; then
+    install_nbinotifications="-nbinotification"
+fi
+if [ -n "$INSTALL_TAPI" ]; then
+    install_tapi="-tapi"
+fi
 
 # generate appropriate configuration files
 cat config_template.json | sed -e "s/ODL_RESTCONF_PORT/$RESTCONF_PORT/" -e "s/ODL_WEBSOCKET_PORT/$WEBSOCKET_PORT/" >config.json
 cat akka-default_template.conf | sed -e "s/ODL_AKKA_PORT/$AKKA_PORT/" -e "s/ODL_AKKA_MGT_PORT/$AKKA_MGT_PORT/" >singlenode/akka-default.conf
 
 #start controller
-java -ms128m -mx512m -XX:MaxMetaspaceSize=128m -jar tpce.jar -restconf config.json -olmtimer1 3000 -olmtimer2 2000
+java -ms128m -mx512m -XX:MaxMetaspaceSize=128m -jar tpce.jar -restconf config.json $install_nbinotifications $install_tapi -olmtimer1 $olmtimer1 -olmtimer2 $olmtimer2
\ No newline at end of file