[COMMON] Fix & add to bashisms CI failover scripts
[oom.git] / kubernetes / sdnc / components / sdnc-prom / resources / bin / sdnc.failover
index e78b7ee..1a74c1e 100755 (executable)
@@ -1,4 +1,5 @@
-#!/bin/bash
+#!/bin/sh
+{{/*
 
 # Copyright © 2018 Amdocs
 #
@@ -13,6 +14,7 @@
 # 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.
+*/}}
 
 LOGFILE="/app/geo.log"
 enableDebugLogging=true
@@ -28,7 +30,7 @@ fi
 APP_BIN=/app/bin
 
 debugLog(){
-  if [ "$enableDebugLogging" == true ]; then
+  if [ "$enableDebugLogging" = true ]; then
      if [ $# -eq 0 ]; then
        echo "" >> $LOGFILE
      else
@@ -39,7 +41,7 @@ debugLog(){
 
 EXC_SIMPLE_FAILOVER=`${APP_BIN}/switchVoting.sh`
 
-if [ "$EXC_SIMPLE_FAILOVER" == "success" ]; then
+if [ "$EXC_SIMPLE_FAILOVER" = "success" ]; then
    debugLog "Simple failover success. SDNC failover completed."
 else
    # Simple failover failed. Trying catastrophic failover ...