]> code.delx.au - monosys/commitdiff
ssh-screen-wrapper supports arguments
authorJames Bunton <jamesbunton@delx.net.au>
Thu, 6 Dec 2018 07:09:14 +0000 (18:09 +1100)
committerJames Bunton <jamesbunton@delx.net.au>
Thu, 6 Dec 2018 07:09:14 +0000 (18:09 +1100)
ssh-screen-wrapper

index aba83ce2bffe1180f022e80d2c2eab0549675a2a..662f08c1b6a63a90c824013bc2768ecabe558f4d 100755 (executable)
@@ -1,4 +1,6 @@
-#!/bin/bash -e
+#!/bin/bash
+
+set -eu
 
 hostname="$(basename "$0")"
 local_hostname="${hostname}.localnet"
@@ -19,11 +21,12 @@ while true; do
         -o ServerAliveInterval=1 \
         -o ServerAliveCountMax=5 \
         -t \
+        "$@" \
         "$hostname" \
         "bash --login -c 'screen -dR'" \
     && exit 0
     echo "Disconnected, waiting..."
-    echo -ne "\033]0;${hostname}: disconnected!\007"
+    echo -ne "\\033]0;${hostname}: disconnected!\\007"
     sleep 1
 done