From 4f56fa7ba8e6f632b48c6085a76cd93da21574a0 Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Sun, 10 Oct 2021 06:53:55 -0400 Subject: toxish: fixes --- scripts/toxish | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/scripts/toxish b/scripts/toxish index 9f62b53..a59671a 100755 --- a/scripts/toxish +++ b/scripts/toxish @@ -51,7 +51,7 @@ function main ;; connect) shift - exists_ok + exists_ok=y tokssh_add "$@" exec ssh "$name" ;; @@ -88,18 +88,13 @@ function tokssh_add then help exit 1 - fi - if [ ${#2} = 76 ] - then - name=$1 - toxid=$2 - elif [ ${#1} = 76 ] + elif [ ${#2} != 76 ] then - name=$2 - toxid=$1 - else echo "$0: Error: Invalid ToxID: $2" >&2 exit 1 + else + name=$1 + toxid=$2 fi mkdir -p ~/.ssh/config.d mkdir -p ~/.tuntox/persist -- cgit v1.2.3