diff --git a/dsmon.sh b/dsmon.sh index 103eb4c..4510265 100755 --- a/dsmon.sh +++ b/dsmon.sh @@ -147,10 +147,10 @@ CHECK(){ echo -en "${idsCL[LightCyan]}${MSG}${spc}: " fi for hostname in "${hostnames_sort[@]}"; do - until [ $(ls /tmp/dscheck.*.running 2>/dev/null | wc -l) -lt 12 ]; do tmp=tmp; done + until [ $(ls /tmp/dscheck.*.running 2>/dev/null | wc -l) -lt 2 ]; do tmp=tmp; done unbuffer bash -c "/usr/local/bin/dsmon runcheck '${hostname}'" > /tmp/dscheck.${hostname}.results & done - [ "${1}" != "report" ] && echo -e "${idsCL[LightGreen]}Done${idsCL[Default]}\n" + [ "${1}" != "report" ] && echo -e "${idsCL[LightGreen]}Done${idsCL[Default]}" shopt -s nullglob nc_count=0; completed=false; scanstart=$(date +%s)