Update offsite-power-check.sh
This commit is contained in:
@@ -27,12 +27,12 @@ $(date)"
|
||||
else
|
||||
PRIORITY=0
|
||||
fi
|
||||
echo "Sending message"
|
||||
curl -d "token=${PUSHOVER_APP_TOKEN}&user=${PUSHOVER_USER_TOKEN}&message=${MESSAGE}&title=${TITLE}&priority=${PRIORITY}&sound=${MSGSOUND}" https://api.pushover.net/1/messages.json
|
||||
}
|
||||
|
||||
while true; do
|
||||
upsinfo=$(upsc CP1500PFCLCD)
|
||||
echo "HERE: ${upsinfo}"
|
||||
if [ "${upsinfo}" != "Error: Connection failure: Connection refused" ]; then
|
||||
OFFSITE_VOLTIN=$(echo "${upsinfo}" | grep 'input.voltage:' | sed 's/.*: //')
|
||||
OFFSITE_BATT_RUNTIME=$(echo "${upsinfo}" | grep 'battery.runtime:' | sed 's/.*: //')
|
||||
|
||||
Reference in New Issue
Block a user