Update dsmon.sh

This commit is contained in:
2025-06-14 12:25:25 -05:00
parent 67760b8f66
commit 89ace9ba61

View File

@@ -87,8 +87,6 @@ RUN(){
fi
}
sleep="1s"
CHECK(){
rm -f /tmp/dscheck.*
start=`date +%s`
@@ -165,7 +163,7 @@ chmod +x /tmp/run_check_${hostname}.sh
until [ "${completed}" == "true" ]; do
until [ $(ls /tmp/dscheck.*.done 2>/dev/null | wc -l) -gt 0 ]; do tmp=tmp; done
for host in /tmp/dscheck.*.done; do
sleep ${sleep}
sleep 1s
NTS=$(grep -oP '(?<=dscheck\.).*?(?=\.done)' <<< "${host}")
if [ -n "$NTS" ]; then
# echo "'$host' = '$NTS'"
@@ -344,7 +342,7 @@ ${DRIVE} : ${DRIVEINFO_FREE[$DRIVE]}GB out of ${DRIVEINFO_TOT[$DRIVE]}GB Free ($
else
echo -e "${idsCL[Yellow]} ${host_name[$hostid]} is down${idsCL[Default]}"; echo
fi
sleep ${sleep}
sleep 1s
mv /tmp/dscheck.${hostname}.running /tmp/dscheck.${hostname}.done
}