From f0c189984beefbddff362def3c235547e1b4f7a9 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 6 Jan 2024 23:59:22 -0600 Subject: [PATCH] Update dsmon.sh --- dsmon.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dsmon.sh b/dsmon.sh index 6dbc15f..68cccd4 100755 --- a/dsmon.sh +++ b/dsmon.sh @@ -131,7 +131,7 @@ CHECK(){ done <<< $(MYSQL_PWD="sysmoninsert" mysql -h ${mysqlip} -u sysmoninsert -e "SELECT id,host,ip,limits FROM servermonitor.hosts WHERE disabled=0") # done <<< $(MYSQL_PWD="sysmoninsert" mysql -h ${mysqlip} -u sysmoninsert -e "SELECT id,host,ip,limits FROM servermonitor.hosts WHERE disabled=0 AND host LIKE '%WAN%'") IFS=$'\n' hostnames_sort=($(sort <<<"${hostnames_sort[*]}")); unset IFS - echo -e "${idsCL[LightGreen]}Done${idsCL[Default]}" + [ "${1}" != "report" ] && echo -e "${idsCL[LightGreen]}Done${idsCL[Default]}" if [ "${1}" != "report" ]; then MSG="Starting jobs to collect host info" @@ -143,8 +143,7 @@ CHECK(){ until [ $(ls /tmp/dscheck.*.running 2>/dev/null | wc -l) -lt 6 ]; do tmp=tmp; done RUN_CHECK ${hostname} > /tmp/dscheck.${hostname}.results 2>/dev/null & done - echo -e "${idsCL[LightGreen]}Done${idsCL[Default]}" - echo + [ "${1}" != "report" ] && echo -e "${idsCL[LightGreen]}Done${idsCL[Default]}\n" nc_count=0; completed=false; scanstart=$(date +%s) until [ "${completed}" == "true" ]; do