diff --git a/dsmon.sh b/dsmon.sh index 1995fee..0c5cb93 100755 --- a/dsmon.sh +++ b/dsmon.sh @@ -94,6 +94,13 @@ CHECK(){ declare -A host_ids declare -a hostnames_sort + if [ "${1}" == "report" ]; then + unset idsCL idsBG idsST + idsCL=('') + idsBG=('') + idsST=('') + fi + while read hostid hostname hostip hostlimits; do if [ "$hostid" != "id" ]; then hostip=$(echo $hostip | cut -d ";" -f1)