From 6ac14fe773f02c5ef1efe5ddfb69be878b69f75b Mon Sep 17 00:00:00 2001 From: Bryan Date: Fri, 1 Jan 2021 19:54:36 -0600 Subject: [PATCH] fixes --- chip-battery.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chip-battery.sh b/chip-battery.sh index 4c9beb1..7c31d58 100644 --- a/chip-battery.sh +++ b/chip-battery.sh @@ -61,7 +61,7 @@ function getChargeCurrent() { # shuts the system down if too less voltage function verifyBatteryVoltage() { echo "$(isBatteryAvailable)" - if [ "$(isBatteryAvailable)" -eq "1" ] ; then + if [ "$?" -eq "1" ] ; then local voltage=$(getBatteryVoltage) local chargeCurrent=$(getChargeCurrent) echo "Voltage: $voltage"