From 05af29d628c83b21092c49524e34a2a30e1a0a13 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 6 Nov 2023 18:17:44 -0600 Subject: [PATCH] Update powerwall.sh --- powerwall.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/powerwall.sh b/powerwall.sh index 688092f9..c2305415 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -225,9 +225,9 @@ CHECKTEMP_SERVICE(){ IFS=$'\n' read -rd '' -a SENSORS_CHECK <<<"${vHOST_TEMPNAMES}" unset IFS - [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/power.${SENSORa}.off)) -ge 300 ] && rm-f ${PW_TMPFOLDER}/power.${SENSORa}.off + [ -f ${PW_TMPFOLDER}/power.${SENSORa}.off ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/power.${SENSORa}.off)) -ge 300 ] && rm-f ${PW_TMPFOLDER}/power.${SENSORa}.off t=1 - + echo "HOST: ${PW_HOST_IDRACS[${SENSORa}]}" # iDS-vMS-Offsite Fan Issue Workaround if [ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.2.1.21" ]; then vHOSTFAN=$(snmpwalk -v 1 -c public -t 2 ${PW_HOST_IDRACS[${SENSORa}]} .1.3.6.1.4.1.674.10892.5.4.700.12.1.6.1.1 -O vq)