@@ -22,7 +22,7 @@ else
ping -c3 ${new_admin_ip} || exit 0
fi
sorted=($(echo $(dig tasks.${SERVICE_NAME}.${APPNET} +short)|sort -n))
- for i in ${!sorted[*]}
+ for (( i=0; i < ${#sorted[*]}; i++ ))
do
if [[ ${sorted[${i}]} == $(dig ${HOSTNAME}.${APPNET} +short) ]];then time_to_dead=$((${i}*180+${curtime}+20));echo "${time_to_dead}" > /tmp/dead;fi
done