X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FRO.git;a=blobdiff_plain;f=scripts%2FRO-start.sh;fp=scripts%2FRO-start.sh;h=30365d506babc4a7fa8b65c690f9c980c4a3cfcf;hp=afc746a61257af8d3429c44f8ac0a133a121b94e;hb=c5293def02d95ed4ee086dd8842437b76ec05c4e;hpb=0446cd5df24c38f95cea13b995c553e9b2403f21 diff --git a/scripts/RO-start.sh b/scripts/RO-start.sh index afc746a6..30365d50 100755 --- a/scripts/RO-start.sh +++ b/scripts/RO-start.sh @@ -66,7 +66,7 @@ function wait_db(){ #wait 120 sec if [ $attempt -ge $max_attempts ]; then echo - echo "Can not connect to database ${db_host}:${db_port} during $max_attempts sec" + echo "Cannot connect to database ${db_host}:${db_port} during $max_attempts sec" return 1 fi attempt=$[$attempt+1] @@ -78,7 +78,8 @@ function wait_db(){ echo "1/4 Apply config" -configure || exit 1 +# this is not needed anymore because envioron overwrites config file +# configure || exit 1 echo "2/4 Wait for db up" @@ -129,4 +130,10 @@ fi echo "4/4 Try to start" -/usr/bin/openmanod -c /etc/osm/openmanod.cfg --log-file=/var/log/osm/openmano.log --create-tenant=osm +# look for openmanod.cfg +RO_CONFIG_FILE="/etc/osm/openmanod.cfg" +[ -f "$RO_CONFIG_FILE" ] || RO_CONFIG_FILE=$(python -c 'import osm_ro; print(osm_ro.__path__[0])')/openmanod.cfg +[ -f "$RO_CONFIG_FILE" ] || ! echo "configuration file 'openmanod.cfg' not found" || exit 1 + +openmanod -c "$RO_CONFIG_FILE" --create-tenant=osm # --log-file=/var/log/osm/openmano.log +