Update nodemgmt-scripts.sh

This commit is contained in:
2023-12-06 17:41:35 -06:00
parent 7195f9617b
commit 7108719674

View File

@@ -880,6 +880,7 @@ GUI(){
STATUS freespace ${3}
else
STATUSRUNS=($(find ${NM_TMPFOLDER}/* -maxdepth 1 -type d -iname "status-*" 2>/dev/null))
echo "HERE: ${STATUSRUNS}"
if [ ${STATUSRUNS} -le 3 ]; then
STATUS_START=$(date +%Y-%m-%d-%H-%M-%S)
STATUSRUN_TMPFOLDER="${NM_TMPFOLDER}/status-${STATUS_START}"
@@ -926,7 +927,7 @@ GUI(){
${NM_SCRIPT} status ${2} ${3} ${4}
exit 0
else
if [ ! -f ${NM_TMPFOLDER}/.statusclean ] || [ $(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/.overload)) -ge 600 ]; then
if [ ! -f ${NM_TMPFOLDER}/.overload ] || [ $(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/.overload)) -ge 600 ]; then
SENDNOTICE "NODEMGMT OVERLOAD" "Whooooaaaaa there cowboy, we got 3 threads running already.... easy killer!" 1
touch ${NM_TMPFOLDER}/.overload
fi