diff --git a/dsmon.sh b/dsmon.sh index 9ad884a..fc1d3e6 100755 --- a/dsmon.sh +++ b/dsmon.sh @@ -155,15 +155,16 @@ CHECK(){ done if [ $(($(date +%s)-scanstart)) -gt 300 ]; then SENDNOTICE "DSmon Scan Stuck" "DSmon Check scan has been running for 10mins, klling all bash...." 1 + pw service all stop killall bash - pw service all restart exit 1 fi - if [ ${nc_count} -eq ${#hostnames_sort[@]} ]; then + if [ ${nc_count} -ge ${#hostnames_sort[@]} ]; then completed=true break fi sleep 1s + edcho "---------------------" done end=`date +%s`; runtime=$((end-start)); echo -e "\nScript Runtime: ${runtime}"