From 53219eaa3c73874f1fced84280a9910f48dc2b70 Mon Sep 17 00:00:00 2001 From: JLKwong Date: Thu, 25 Mar 2021 22:03:22 -0700 Subject: [PATCH] restore remote reverse (fixes #2137) --- modules/remote.sh | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/modules/remote.sh b/modules/remote.sh index 667b5361c..f6a25f61c 100644 --- a/modules/remote.sh +++ b/modules/remote.sh @@ -76,16 +76,12 @@ function remote { cmd_str+="\"$line\"," done <<< "$reverse" ip=$(printf "%s\n" "${cmd_str::-1}" | cut -d',' -f 1) - org=$(printf "%s\n" "${cmd_str::-1}" | cut -d',' -f 2) - country=$(printf "%s\n" "${cmd_str::-1}" | cut -d',' -f 3) - city=$(printf "%s\n" "${cmd_str::-1}" | cut -d',' -f 4) - postal=$(printf "%s\n" "${cmd_str::-1}" | cut -d',' -f 5) + org=$(printf "%s\n" "${cmd_str::-1}" | cut -d',' -f 5) + country=$(printf "%s\n" "${cmd_str::-1}" | cut -d',' -f 4) + city=$(printf "%s\n" "${cmd_str::-1}" | cut -d',' -f 3) + postal=$(printf "%s\n" "${cmd_str::-1}" | cut -d',' -f 2) timezone=$(printf "%s\n" "${cmd_str::-1}" | cut -d',' -f 6) - echo $(internet reverse) - echo " CITY: $city" - echo " POSTAL: $postal" - echo "{$ip,$org,$country,$city,$postal,$timezone}" ;; "allservices") @@ -219,20 +215,20 @@ function remote_help { echo echo "$BASENAME remote check" echo " " - echo " │ │ │ │" - echo " │ │ │ └── model number of rpi" - echo " │ │ └─────────── current cli version" - echo " │ └─────────────────────── current treehouses image version" - echo " └──────────────────────────────────── bluetooth mac address" + echo " ¦ ¦ ¦ ¦" + echo " ¦ ¦ ¦ +-- model number of rpi" + echo " ¦ ¦ +----------- current cli version" + echo " ¦ +----------------------- current treehouses image version" + echo " +------------------------------------ bluetooth mac address" echo echo "$BASENAME remote status" echo " " - echo " │ │ │ │ │" - echo " │ │ │ │ └── model number of rpi" - echo " │ │ │ └───────────── current cli version" - echo " │ │ └────────────────────── current treehouses image version" - echo " │ └────────────────────────────────── bluetooth mac address" - echo " └─────────────────────────────────────────────── internet connection status" + echo " ¦ ¦ ¦ ¦ ¦" + echo " ¦ ¦ ¦ ¦ +-- model number of rpi" + echo " ¦ ¦ ¦ +------------- current cli version" + echo " ¦ ¦ +---------------------- current treehouses image version" + echo " ¦ +---------------------------------- bluetooth mac address" + echo " +----------------------------------------------- internet connection status" echo echo "$BASENAME remote upgrade" echo "true if an upgrade is available"