Update powerwall.sh
This commit is contained in:
@@ -19,13 +19,13 @@ CHECKTEMP(){
|
||||
start=`date +%s`
|
||||
cw=25;
|
||||
echo
|
||||
[ "${1}" != "" ] && [ "${1}" != "noavg" ] && avgdays=${1} || avgdays=3
|
||||
[ "${1}" != "" ] && [ "${1}" != "noavg" ] && [[ "${1}" =~ ^[0-9]+$ ]] && avgdays=${1} || avgdays=3
|
||||
# echo -e "${idsCL[Yellow]}Sensor Temperature(s) ${idsCL[Green]}normal${idsCL[Default]} /${idsCL[Yellow]}warning${idsCL[Default]}/ ${idsCL[Red]}critical${idsCL[Default]}"
|
||||
echo -e "${idsCL[Cyan]}Sensor Temperature(s) Current / ${avgdays}DayAVG ${idsCL[Yellow]}warning${idsCL[Default]} / ${idsCL[Red]}critical${idsCL[Default]}"
|
||||
DIVIDER . yellow 90
|
||||
|
||||
for SENSOR in ${PW_SENSOR_ORD[@]}; do
|
||||
if [ "${1}" == "" ] || [[ "${SENSOR}" = *"${1}"* ]] || [ "${1}" == "noavg" ]; then
|
||||
if [ "${1}" == "" ] || [[ "${SENSOR}" = *"${1}"* ]] || [ "${1}" == "noavg" ] || [[ "${1}" =~ ^[0-9]+$ ]]; then
|
||||
|
||||
if [ "${PW_SENSOR_TYPE[${SENSOR}]}" == "esxi" ]; then
|
||||
vHOSTiDRACIP=${PW_HOST_IDRACS[${SENSOR}]}
|
||||
|
||||
Reference in New Issue
Block a user