diff --git a/ngcp-update-db-schema b/ngcp-update-db-schema index b1ce067d..7f46fce2 100755 --- a/ngcp-update-db-schema +++ b/ngcp-update-db-schema @@ -70,7 +70,9 @@ if ! mysql -usipwise -p${SIPWISE_DB_PASSWORD} ngcp -e 'describe db_schema' >/de fi running_on_active_node() { - if [ -x /usr/sbin/ngcp-check_active ] ; then + if ! [ -x /usr/sbin/ngcp-check_active ] ; then + return 1 + else if /usr/sbin/ngcp-check_active -q ; then verbose "This seems to be the active node, nothing to do." return 0 @@ -78,8 +80,6 @@ running_on_active_node() { verbose "This seems to be the inactive node, applying revisions." return 1 fi - else - return 1 fi }