Update offsite-power-check.sh
This commit is contained in:
@@ -32,8 +32,7 @@ $(date)"
|
||||
|
||||
while true; do
|
||||
upsinfo=$(upsc CP1500PFCLCD)
|
||||
echo "HERE: ${upsinfo}"
|
||||
if [ "${upsinfo}" != "" ] && [ "${upsinfo}" != "Error: Connection failure: Connection refused" ]; then
|
||||
if [ "${upsinfo}" != "" ]; then
|
||||
OFFSITE_VOLTIN=$(echo "${upsinfo}" | grep 'input.voltage:' | sed 's/.*: //')
|
||||
OFFSITE_BATT_RUNTIME=$(echo "${upsinfo}" | grep 'battery.runtime:' | sed 's/.*: //')
|
||||
OFFSITE_BATT_RUNTIME=`echo "scale=2; ${OFFSITE_BATT_RUNTIME}/60" | bc`
|
||||
|
||||
Reference in New Issue
Block a user