Update power.inc.sh

This commit is contained in:
2024-02-05 11:21:24 -06:00
parent 3be1777c13
commit bf5f42ccb5

View File

@@ -214,7 +214,8 @@ CHECKPOWER(){
[ ${REPORT} -eq 0 ] && echo -en "${idsCL[Yellow]}Pulling data from 'Offsite' ... "
upsinfo=$(ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 admin@10.2.1.1 'upsc CP1500PFCLCD')
# upsinfo=$(ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 admin@10.2.1.1 'upsc CP1500PFCLCD')
upsinfo=$(upsc CP1500PFCLCD)
if [ "$(echo "${upsinfo}" | grep 'input.voltage:')" != "" ]; then
OFFSITE_VOLTIN=$(echo "${upsinfo}" | grep 'input.voltage:' | sed 's/.*: //')
OFFSITE_VOLTOUT=$(echo "${upsinfo}" | grep 'output.voltage:' | sed 's/.*: //')