From f5397e2940f8cd78e170550c902c2c4576cdea2d Mon Sep 17 00:00:00 2001 From: JLKwong <61807745+JLKwong@users.noreply.github.com> Date: Wed, 24 Mar 2021 18:11:23 -0700 Subject: [PATCH] treehouses remote reverse key value (fixes #2128) (#2130) Co-authored-by: dogi --- modules/remote.sh | 7 +++---- package.json | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/remote.sh b/modules/remote.sh index ae8a2693ee..b0cd4cd273 100644 --- a/modules/remote.sh +++ b/modules/remote.sh @@ -71,7 +71,7 @@ function remote { ;; "reverse") checkargn $# 2 - reverse=$(internet reverse | sed -e 's#",\ "#"\n"#g' | cut -d'"' -f4) + reverse=$(internet reverse | sed -e 's#",\ "#"\n"#g' | cut -d'"' -f 2,3,4 | sed 's#\:[[:space:]]\"#:\"#g') while IFS= read -r line; do cmd_str+="\"$line\"," done <<< "$reverse" @@ -99,8 +99,8 @@ function remote { printf "$json_fmt" "$available_str" "$installed_str" "$running_str" "${icon_str::-1}" "${info_str::-1}" "${autorun_str::-1}" "${env_str::-1}" "${size_str::-1}" ;; "statuspage") - countryonly=$(wificountry) - checkargn $# 1 + countryonly=$(wificountry) + checkargn $# 1 json_statusfmt="{\"status\":\"$(remote status)\",\"hostname\":\"$(hostname)\",\"arm\":\"$(detect arm)\",\"internet\":\"$(internet)\",\"memory_total\":\"$(memory total gb)\",\"memory_used\":\"$(memory used gb)\",\"temperature\":\"$(temperature)\",\"networkmode\":\"$(networkmode)\",\"info\":\"$(networkmode info | tr '\n' ' ')\",\"storage\":\"$(system disk | tr '\n' ' ' | sed 's/^[[:space:]]*//;s/ \{1,\}/ /g;s/[[:space:]]*$//')\",\"wificountry\":\"${countryonly:8}\"}" printf '%s\n' "${json_statusfmt}" @@ -141,7 +141,6 @@ function remote { send) checkargn $# 3 profile=$3 - public_key=$(sshtunnel key send public $profile) private_key=$(sshtunnel key send private $profile | tr '\n' ' ') diff --git a/package.json b/package.json index 7bab5e7167..dfa47d7b53 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@treehouses/cli", - "version": "1.25.32", + "version": "1.25.33", "remote": "4000", "description": "Thin command-line interface for Raspberry Pi low level configuration.", "main": "cli.sh",