This commit is contained in:
2024-02-06 21:26:26 -06:00
parent bfe3c3e759
commit 3ec9df08b7
3 changed files with 40 additions and 40 deletions

View File

@@ -45,12 +45,12 @@ CHECKPOWER(){
REPORT=0
while [ $# -gt 0 ]; do
case "$1" in
-a|-avg) avgdays=${2};;
-o|-offsite) STYPE=offsite;;
-m|-mainsite) STYPE=mainsite;;
-e|-esxi) PTYPE=esxi;;
-p|-power) PTYPE=power;;
-r|-report)
-a,-avg) avgdays=${2};;
-o,-offsite) STYPE=offsite;;
-m,-mainsite) STYPE=mainsite;;
-e,-esxi) PTYPE=esxi;;
-p,-power) PTYPE=power;;
-r,-report)
REPORT=1
unset idsCL idsBG idsST
idsCL=('')

View File

@@ -28,13 +28,13 @@ CHECKTEMP(){
cdt=$(date +%Y-%m-%d-%H-%M-%S)
while [ $# -gt 0 ]; do
case "$1" in
-a|-avg) avgdays=${2};;
-S|-sensors) TTYPE="sensors";;
-o|-offsite) STYPE=offsite;;
-m|-mainsite) STYPE=mainsite;;
-e|-esxi) TTYPE="esxi";;
-f|-fans) TTYPE="fans";;
-s|-search) search=${2};;
-a,-avg) avgdays=${2};;
-S,-sensors) TTYPE="sensors";;
-o,-offsite) STYPE=offsite;;
-m,-mainsite) STYPE=mainsite;;
-e,-esxi) TTYPE="esxi";;
-f,-fans) TTYPE="fans";;
-s,-search) search=${2};;
esac
shift 1
done
@@ -1100,11 +1100,11 @@ SERVERROOM_TEMP_DIFFERENCE(){
scandefault=288
while [ $# -gt 0 ]; do
case "${1}" in
-l|-last) LAST=${2};;
-h|-help|--help)
-l,-last) LAST=${2};;
-h,-help,--help)
echo -e "Usage: ${idsCL[Yellow]}[powerwall or pw] tempdiff {opt}${idsCL[Default]} {"
width=15
printf "%-${width}s- %s\n" " -l|-last" "(number of last scan times to average from, defaults to ${scandefault})"
printf "%-${width}s- %s\n" " -l,-last" "(number of last scan times to average from, defaults to ${scandefault})"
echo -e "}\n"
exit 0;;
esac