X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=scripts%2FRO-start.sh;fp=scripts%2FRO-start.sh;h=7d442f0237194a511cce914e0bfd2f045ba899f9;hb=920210266c12f772ec1efe3d9494b0b6b10ac172;hp=afc746a61257af8d3429c44f8ac0a133a121b94e;hpb=1f7d9d8e4e87be8c104fb93f133c2e68880a77c8;p=osm%2FRO.git diff --git a/scripts/RO-start.sh b/scripts/RO-start.sh index afc746a6..7d442f02 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,9 @@ 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" --log-file=/var/log/osm/openmano.log --create-tenant=osm