ericallenpaul / Zabbix-Twilio.sh

A set of shell scripts to send SMS messages with Zabbix. It supports scheduling
16 stars 8 forks source link

Shedule.sh bug #3

Closed ShaBangBinBash closed 2 years ago

ShaBangBinBash commented 2 years ago

if [ $COUNTER -eq ${#PHONE[@]-1} ]; should be if [ $COUNTER -eq ${#PHONE[@]} ]; or produces an error in bash.

Also equates to wrong number as COUNTER++ precedes this, so you are checking the following COUNTER goes from 1 to x PHONE goes from 0 to 2 This will skip item 0 every time

ericallenpaul commented 2 years ago

Fixed. Thanks for pointing this out.