Update dsmon.sh

This commit is contained in:
2023-01-02 09:22:23 -06:00
parent 1583165eba
commit ef3da3f3dd

View File

@@ -98,12 +98,12 @@ CHECK(){
fi
done <<< $(MYSQL_PWD="sysmoninsert" mysql -h mysqldb.scity.us -P 3306 -u sysmoninsert -e "SELECT id,host,ip,limits FROM servermonitor.hosts")
IFS=$'\n' sorted=($(sort <<<"${hostnames_sort[*]}"))
IFS=$'\n' hostnames_sort=($(sort <<<"${hostnames_sort[*]}"))
unset IFS
for x in "${!hostnames[@]}"; do printf "[%s]=%s\n" "$x" "${hostnames[$x]}" ; done
echo
for x in "${!sorted[@]}"; do printf "[%s]=%s\n" "$x" "${sorted[$x]}" ; done
for x in "${!hostnames_sort[@]}"; do printf "[%s]=%s\n" "$x" "${hostnames_sort[$x]}" ; done
# for hostid in "${!host_ip[@]}"; do