Update power.inc.sh

This commit is contained in:
2023-12-30 15:47:15 -06:00
parent 44a959feff
commit eafd7cacad

View File

@@ -29,6 +29,12 @@ CHECKPOWER(){
-m|-mainsite) STYPE=mainsite;; -m|-mainsite) STYPE=mainsite;;
-e|-esxi) PTYPE=esxi;; -e|-esxi) PTYPE=esxi;;
-p|-power) PTYPE=power;; -p|-power) PTYPE=power;;
-r|-report)
unset idsCL idsBG idsST
idsCL=('')
idsBG=('')
idsST=('')
;;
esac esac
shift 1 shift 1
done done
@@ -563,8 +569,7 @@ Shutting down main servers" 1
} }
POWERLOGGER_SERVICE(){ POWERLOGGER_SERVICE(){
SENDNOTICE "TEST 2" "TESTING TESTING" & SENDPOWER "POWER LOGGING Service Startup" &
SENDNOTICE "POWER LOGGING Service Startup" "`${PW_SCRIPT} check power -p`" &
while true; do while true; do
LogDataTime=`date +'%Y-%m-%d %H:%M:%S'` LogDataTime=`date +'%Y-%m-%d %H:%M:%S'`
source ${PW_FOLDER}/defaults.inc source ${PW_FOLDER}/defaults.inc
@@ -860,7 +865,10 @@ PDUCONTROL(){
} }
SENDPOWER(){ SENDPOWER(){
SENDNOTICE "${1}" "`${PW_SCRIPT} check power -p`" & SENDNOTICE "TEST 2" "TESTING TESTING" &
echo -en "sending ... "
SENDNOTICE "${1}" "`${PW_SCRIPT} check power -p`"
echo done
} }