Update powerwall.sh

This commit is contained in:
2023-05-15 22:30:17 -05:00
parent c74a832b62
commit 496a638198

View File

@@ -621,7 +621,11 @@ fi
/usr/local/bin/powerwall service ${2} start
elif [ "${3}" = "status" ]; then
SERVICE_MNG ${2} status
srvc=${POWERWALL_SERVICES[${2}]}
c=0; spc=''; spc1=`expr 25 - ${#srvc}`; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
echo -en "${idsCL[LightCyan]}${srvc}${spc}: "
[ "$(systemctl is-active ${srvc})" == "active" ] && echo -en "${idsCL[Green]}Running" || echo -en "${idsCL[Yellow]}Not Running"
echo -e "${idsCL[Default]}"
fi
fi
;;