diff options
author | Andrew Cady <d@jerkface.net> | 2021-10-10 06:53:55 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2021-10-10 06:53:55 -0400 |
commit | 4f56fa7ba8e6f632b48c6085a76cd93da21574a0 (patch) | |
tree | 73098bb0dd368902825a689aa8f0d526e010dda7 /scripts | |
parent | 6b71f5dd26283ff95d6bbd19797d3d15dd7215f3 (diff) |
toxish: fixes
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/toxish | 15 |
1 files 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 | |||
51 | ;; | 51 | ;; |
52 | connect) | 52 | connect) |
53 | shift | 53 | shift |
54 | exists_ok | 54 | exists_ok=y |
55 | tokssh_add "$@" | 55 | tokssh_add "$@" |
56 | exec ssh "$name" | 56 | exec ssh "$name" |
57 | ;; | 57 | ;; |
@@ -88,18 +88,13 @@ function tokssh_add | |||
88 | then | 88 | then |
89 | help | 89 | help |
90 | exit 1 | 90 | exit 1 |
91 | fi | 91 | elif [ ${#2} != 76 ] |
92 | if [ ${#2} = 76 ] | ||
93 | then | ||
94 | name=$1 | ||
95 | toxid=$2 | ||
96 | elif [ ${#1} = 76 ] | ||
97 | then | 92 | then |
98 | name=$2 | ||
99 | toxid=$1 | ||
100 | else | ||
101 | echo "$0: Error: Invalid ToxID: $2" >&2 | 93 | echo "$0: Error: Invalid ToxID: $2" >&2 |
102 | exit 1 | 94 | exit 1 |
95 | else | ||
96 | name=$1 | ||
97 | toxid=$2 | ||
103 | fi | 98 | fi |
104 | mkdir -p ~/.ssh/config.d | 99 | mkdir -p ~/.ssh/config.d |
105 | mkdir -p ~/.tuntox/persist | 100 | mkdir -p ~/.tuntox/persist |