Update nodemgmt-scripts.sh

This commit is contained in:
2024-11-29 16:07:31 -06:00
parent 9b42ff1318
commit 653ca70784

View File

@@ -1300,20 +1300,11 @@ GUI(){
else
if [ ! -f ${NM_TMPFOLDER}/.statusclean ] || [ $(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/.statusclean)) -ge 900 ]; then
for oldstatus_check in ${NM_TMPFOLDER}/status-*; do
echo -n "HERE: ${oldstatus_check} === "
if ! [[ "${oldstatus_check}" =~ ".stuck" ]]; then
echo -n "not stuck - "
if [ $(expr $(date +%s) - $(stat -c %Y ${oldstatus_check})) -ge 60 ]; then
echo "removing"
# rm -Rf ${oldstatus_check}
else
echo "not removing"
fi
else
echo "STUCK"
if ! [[ "${oldstatus_check}" =~ ".stuck" ]] && [ $(expr $(date +%s) - $(stat -c %Y ${oldstatus_check})) -ge 60 ]; then
rm -Rf ${oldstatus_check}
fi
done
# touch ${NM_TMPFOLDER}/.statusclean
touch ${NM_TMPFOLDER}/.statusclean
fi
STATUSRUNS=($(find ${NM_TMPFOLDER}/* -maxdepth 1 -type d -iname "status-*" 2>/dev/null))
if [ "${2}" == "-h" ] || [ "${2}" == "-help" ]; then