From 876b3265f2d6b48fb637ccc1662643692a7b6af1 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 17 Dec 2023 16:38:45 -0600 Subject: [PATCH] Update power.inc.sh --- inc/power.inc.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/power.inc.sh b/inc/power.inc.sh index 221ef874..f17b3303 100644 --- a/inc/power.inc.sh +++ b/inc/power.inc.sh @@ -386,7 +386,7 @@ BATT VOLTAGE: ${BATTVOLT}'volts" fi echo 1a if [ ! -f ${PW_TMPFOLDER}/power.ac.good ]; then - + echo 1a-1 if [ -f ${PW_TMPFOLDER}/shutdown.SYS ] || [ -f ${PW_TMPFOLDER}/shutdown.MAIN ] || [ -f ${PW_TMPFOLDER}/power.ac.conserve ]; then SENDNOTICE "HOSTS POWER" "Power restored! Will wait ${PW_WAIT_TO_POWER_SERVERS}'mins before turning host(s) back on" touch ${PW_TMPFOLDER}/.power.restored @@ -396,6 +396,7 @@ BATT VOLTAGE: ${BATTVOLT}'volts" touch ${PW_TMPFOLDER}/power.ac.good elif [ -f ${PW_TMPFOLDER}/.power.restored ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.power.restored)) -ge $(echo "scale=0; ${PW_WAIT_TO_POWER_SERVERS}*60" | bc) ]; then + echo 1a-2 HOSTMGMT mainsite -p on >/dev/null 2>&1 rm -f ${PW_TMPFOLDER}/.power.restored fi