Fix for ONOS_APPS with dot in their name (ONOS-5843).

Change-Id: I6321e9984df2ec2e11aa99edd2756d44c2273c90
diff --git a/tools/package/bin/onos-service b/tools/package/bin/onos-service
index d475968..799bb2f 100755
--- a/tools/package/bin/onos-service
+++ b/tools/package/bin/onos-service
@@ -41,11 +41,13 @@
 # Activate the system required applications (SYS_APPS) as well as any
 # specified applications in the var ONOS_APPS
 for app in ${SYS_APPS//,/ } ${ONOS_APPS//,/ }; do
-  if [[ "$app" =~ \. ]]; then
-    touch ${ONOS_HOME}/apps/$app/active
-  else
-    touch ${ONOS_HOME}/apps/org.onosproject.$app/active
-  fi
+    if  [ -d "${ONOS_HOME}/apps/org.onosproject.$app/" ]; then
+        touch ${ONOS_HOME}/apps/org.onosproject.$app/active
+    elif [ -d "${ONOS_HOME}/apps/$app" ]; then
+        touch ${ONOS_HOME}/apps/$app/active
+    else
+        echo "[WARN] Don't know how to activate $app"
+    fi
 done
 
 exec ${ONOS_HOME}/apache-karaf-$KARAF_VERSION/bin/karaf $KARAF_ARGS