From 446721d6063cd387335ef3767a7b35c13ed646d4 Mon Sep 17 00:00:00 2001 From: John Gaunt Date: Mon, 30 Nov 2020 20:16:18 -0500 Subject: [PATCH] updates for charging and replacing battery --- pfsenseDellBatteryNUT.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pfsenseDellBatteryNUT.sh b/pfsenseDellBatteryNUT.sh index 2374e57..f4b2eec 100644 --- a/pfsenseDellBatteryNUT.sh +++ b/pfsenseDellBatteryNUT.sh @@ -23,8 +23,13 @@ if [ ${BATTERY_STATE} = 'discharging' ]; then else BATTERY_STATE='LB' fi -elif [ ${BATTERY_STATE} = 'charging' ] || [ ${BATTERY_STATE} = 'high' ]; then +elif [ ${BATTERY_STATE} = 'charging' ]; then + BATTERY_STATE='CHRG' +elif [ ${BATTERY_STATE} = 'high' ]; then BATTERY_STATE='OL' + if [ ${BATTERY_WEAR_PERCENT} <= 25 ]; then + BATTERY_STATE='RB' + fi fi echo "# Last Updated: $(date)" > ${FILE_LOCATION}