Skip to content

Commit

Permalink
restore remote reverse (fixes #2137)
Browse files Browse the repository at this point in the history
  • Loading branch information
JLKwong committed Mar 26, 2021
1 parent a0d96ca commit 53219ea
Showing 1 changed file with 15 additions and 19 deletions.
34 changes: 15 additions & 19 deletions modules/remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -219,20 +215,20 @@ function remote_help {
echo
echo "$BASENAME remote check"
echo "<bluetooth mac> <image> <version> <detectrpi>"
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 "<internet> <bluetooth mac> <image> <version> <detectrpi>"
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"
Expand Down

0 comments on commit 53219ea

Please sign in to comment.