]> code.delx.au - monosys/commitdiff
ssh-screen-wrapper: simplify
authorJames Bunton <jamesbunton@delx.net.au>
Mon, 24 Jan 2022 08:15:37 +0000 (19:15 +1100)
committerJames Bunton <jamesbunton@delx.net.au>
Mon, 24 Jan 2022 08:15:37 +0000 (19:15 +1100)
hacks/ssh-screen-wrapper

index fe083cc5eb0206c50ea5d461bde7efa428390fba..c40a490e357b6aa1abbbbf0a84345f5b0c4eb3ac 100755 (executable)
@@ -3,16 +3,6 @@
 set -eu
 
 hostname="$(basename "$0")"
-local_hostname="${hostname}.localnet"
-public_hostname="p${hostname}"
-
-if grep -Eq "^Host ${hostname}\b" ~/.ssh/config; then
-    true
-elif ping -c1 -t1 "$local_hostname" &> /dev/null; then
-    hostname="$local_hostname"
-else
-    hostname="$public_hostname"
-fi
 
 while true; do
     clear