From d72df445ba1c5ed8fda519cc1ec0b6c053b3a391 Mon Sep 17 00:00:00 2001 From: Johannes Date: Sun, 12 Jan 2020 22:39:10 +0100 Subject: [PATCH] Minor updates after latest pull request #8 --- README.md | 1 + fritzBoxShell.sh | 6 +++--- fritzBoxShellTest.sh | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) mode change 100644 => 100755 fritzBoxShellTest.sh diff --git a/README.md b/README.md index d02f5c4..8e46fee 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,7 @@ Example (Deactivates the 5Ghz on your FritzBox): | REBOOT | Box or Repeater | Rebooting your Fritz!Box or Fritz!Repeater | | UPNPMetaData | STATE or | Full unformatted output of tr64desc.xml to console or file | | IGDMetaData | STATE or | Full unformatted output of igddesc.xml to console or file | +| VERSION | | Version of the fritzBoxShell.sh | ### Notes: diff --git a/fritzBoxShell.sh b/fritzBoxShell.sh index 232035b..1c85790 100755 --- a/fritzBoxShell.sh +++ b/fritzBoxShell.sh @@ -463,7 +463,7 @@ DisplayArguments() { echo "| Action | Parameter | Description |" echo "|--------------|------------------------|-------------------------------------------------------------------------|" echo "|--------------|------------------------|-------------------------------------------------------------------------|" - echo "| DeviceInfo | STATE | Show information about your Fritz!Box like ModelName, SN, etc. |" + echo "| DEVICEINFO | STATE | Show information about your Fritz!Box like ModelName, SN, etc. |" echo "| WLAN_2G | 0 or 1 or STATE | Switching ON, OFF or checking the state of the 2,4 Ghz WiFi |" echo "| WLAN_2G | STATISTICS | Statistics for the 2,4 Ghz WiFi easily digestible by telegraf |" echo "| WLAN_5G | 0 or 1 or STATE | Switching ON, OFF or checking the state of the 5 Ghz WiFi |" @@ -499,7 +499,7 @@ then DisplayArguments elif [ -z "$2" ] then - if [ "${option1^^}" = "VERSION" ]; then + if [ "$option1" = "VERSION" ]; then script_version else DisplayArguments fi @@ -548,7 +548,7 @@ else UPNPMetaData "$option2"; elif [ "$option1" = "IGDMetaData" ]; then IGDMetaData "$option2"; - elif [ "${option1^^}" = "DEVICEINFO" ]; then + elif [ "$option1" = "DEVICEINFO" ]; then Deviceinfo "$option2"; elif [ "$option1" = "LED" ]; then LEDswitch "$option2"; diff --git a/fritzBoxShellTest.sh b/fritzBoxShellTest.sh old mode 100644 new mode 100755 index 2863fe8..0166153 --- a/fritzBoxShellTest.sh +++ b/fritzBoxShellTest.sh @@ -28,6 +28,6 @@ do [[ "$words" -ge ${minwords[$counter]} ]] && echo -e "\tis working!" || echo -e "\tis not working!" counter=$((counter+1)) done -/bin/bash "$DIRECTORY/fritzBoxShell.sh" Deviceinfo 3 | grep NewModelName -/bin/bash "$DIRECTORY/fritzBoxShell.sh" Deviceinfo 3 | grep NewSoftwareVersion -/bin/bash "$DIRECTORY/fritzBoxShell.sh" Version +/bin/bash "$DIRECTORY/fritzBoxShell.sh" DEVICEINFO 3 | grep NewModelName +/bin/bash "$DIRECTORY/fritzBoxShell.sh" DEVICEINFO 3 | grep NewSoftwareVersion +/bin/bash "$DIRECTORY/fritzBoxShell.sh" VERSION