MT#16391 Fix regression regarding unset NGCP_PORTFILE

Fix regression from d62433cf93
if NGCP_PORTFILE is unset

Change-Id: I9ac5e793d1a3bc4d8e3094c6b70987fcf42cf978
changes/30/13530/3
Michael Prokop 9 years ago
parent fa88307845
commit e40ec0137e

@ -1,6 +1,8 @@
#!/bin/bash
if [ -r "${NGCP_PORTFILE:-/var/run/ngcpcfg.port}" ] ; then
NGCP_PORTFILE="${NGCP_PORTFILE:-/var/run/ngcpcfg.port}"
if [ -r "${NGCP_PORTFILE}" ] ; then
port=$(cat "${NGCP_PORTFILE}")
else
echo "ERROR: Couldn't read file ${NGCP_PORTFILE}" >&2

Loading…
Cancel
Save