Update dsmon.sh

This commit is contained in:
2025-06-14 09:46:38 -05:00
parent 8320da4c79
commit f2b0242e9a

View File

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