X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fsdnc%2Fresources%2Fgeo%2Fbin%2Fsdnc.isPrimaryCluster;h=ffd044854f72deeca1e2facb00b7fcc24c74742f;hb=b1ee058f941a9c9ff27467054d98b8a56c988797;hp=77fc65fe39a3bdd8b3f0f33f17285898ece8e802;hpb=cf173e0470d1e78565d6a3db77296fe870631ec1;p=oom.git diff --git a/kubernetes/sdnc/resources/geo/bin/sdnc.isPrimaryCluster b/kubernetes/sdnc/resources/geo/bin/sdnc.isPrimaryCluster index 77fc65fe39..ffd044854f 100755 --- a/kubernetes/sdnc/resources/geo/bin/sdnc.isPrimaryCluster +++ b/kubernetes/sdnc/resources/geo/bin/sdnc.isPrimaryCluster @@ -1,8 +1,24 @@ #!/bin/bash +{{/* -OOM_HOME=${OOM_HOME:-$HOME} +# Copyright © 2018 Amdocs +# +# 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. +*/}} -IS_PRIMARY_CLUSTER=`awk '/isPrimaryCluster/ {print $2}' ${OOM_HOME}/oom/kubernetes/sdnc/values.yaml` +dir=$( dirname $0 ) + +IS_PRIMARY_CLUSTER=`awk '/isPrimaryCluster/ {print $2}' $dir/../../../values.yaml` if [ "$?" -eq "2" ]; then echo "Make sure you are ubuntu user." >&2