Update nodemgmt-scripts.sh

This commit is contained in:
2023-07-24 18:11:35 -05:00
parent f3ffc5f16b
commit 4fd8728266

View File

@@ -786,6 +786,15 @@ GUI(){
DOWNLIST ${2}
fi;;
status)
if [ -f "${NM_FOLDER}/status-check.running" ] && [ $(expr `date +%s` - $(stat -c %Y ${NM_FOLDER}/status-check.running)) -gt 1800 ]; then
SENDNOTICE "Nodemgmt Script Error" "Status monitoring system resetting"
mv ${NM_FOLDER}/status-check.running ${NM_FOLDER}/status-check.running.crash
getStuckNM=$(pgrep -f '/nodemgmt')
for i in $getStuckNM; do
/bin/kill $i
done
fi
if [ -f "${NM_FOLDER}/status-check.running" ]; then
cbd=`date +%s`-$(stat -c %Y ${NM_FOLDER}/status-check.running)
[ ${cbd} -gt 900 ] && rm -f "${NM_FOLDER}/status-check.running"