X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=docker%2Fscripts%2Fstart.sh;h=0b0cb79ff38f6a70b1f3e8280e07b5d5e6abe28c;hb=refs%2Fchanges%2F41%2F8741%2F3;hp=fc0b3c33a25a8fae79752fc51b82a535d1f22a5c;hpb=c0da257ff744282c178594bab0b50ee3a0f3416e;p=osm%2FMON.git diff --git a/docker/scripts/start.sh b/docker/scripts/start.sh index fc0b3c3..0b0cb79 100644 --- a/docker/scripts/start.sh +++ b/docker/scripts/start.sh @@ -1,3 +1,25 @@ +# -*- coding: utf-8 -*- + +# Copyright 2018 Whitestack, LLC +# ************************************************************* + +# This file is part of OSM Monitoring module +# All Rights Reserved to Whitestack, LLC + +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# For those usages not covered by the Apache License, Version 2.0 please +# contact: glavado@whitestack.com +## DB_EXISTS="" max_attempts=120 @@ -37,11 +59,11 @@ function is_db_created() { } if [[ $OSMMON_SQL_DATABASE_URI == *'mysql'* ]]; then - DB_HOST=$(echo $OSMMON_SQL_DATABASE_URI | sed -r 's|^\w+://.+:.+@(.+):.*$|\1|') - DB_PORT=$(echo $OSMMON_SQL_DATABASE_URI | sed -r 's|^\w+://.*:([0-9]+).*$|\1|') - DB_USER=$(echo $OSMMON_SQL_DATABASE_URI | sed -r 's|^\w+://(.+):.+@.+$|\1|') + DB_HOST=$(echo $OSMMON_SQL_DATABASE_URI | sed -r 's|^.+://.+:.+@(.+):.*$|\1|') + DB_PORT=$(echo $OSMMON_SQL_DATABASE_URI | sed -r 's|^.+://.*:([0-9]+).*$|\1|') + DB_USER=$(echo $OSMMON_SQL_DATABASE_URI | sed -r 's|^.+://(.+):.+@.+$|\1|') DB_PASSWORD=$(echo $OSMMON_SQL_DATABASE_URI | sed -r 's|^.+://.+:(.+)@.*$|\1|') - DB_NAME=$(echo $OSMMON_SQL_DATABASE_URI | sed -r 's|^\w+://.+:.+@.+:.*/(.+)$|\1|') + DB_NAME=$(echo $OSMMON_SQL_DATABASE_URI | sed -r 's|^.+://.+:.+@.+:.*/(\w+)(\?.*)?$|\1|') wait_db "$DB_HOST" "$DB_PORT" || exit 1 @@ -54,4 +76,5 @@ fi osm-mon-server & osm-mon-evaluator & -osm-mon-collector \ No newline at end of file +osm-mon-collector & +osm-mon-dashboarder \ No newline at end of file