tomishinets.v %!s(int64=5) %!d(string=hai) anos
pai
achega
6cee725c22
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      healthcheck.sh

+ 2 - 1
healthcheck.sh

@@ -24,7 +24,8 @@ else
     sorted=($(echo $(dig tasks.${SERVICE_NAME}.${APPNET} +short)|tr " " "\n"|sort -n))
     for (( i=0; i < ${#sorted[*]}; i++ ))
     do
-      if [[ ${sorted[${i}]} == $(dig ${HOSTNAME}.${APPNET} +short) ]];then echo $((${i}*180+$(date +%s)+20)) > /tmp/dead;fi
+      [[ $(ip a | grep ${sorted[${i}]}) ]] && echo $((${i}*180+$(date +%s)+20)) > /tmp/dead
+#      if [[ ${sorted[${i}]} == $(dig ${HOSTNAME}.${APPNET} +short) ]];then echo $((${i}*180+$(date +%s)+20)) > /tmp/dead;fi
     done
   fi
 fi