aboutsummaryrefslogtreecommitdiff
path: root/assh
diff options
context:
space:
mode:
Diffstat (limited to 'assh')
-rwxr-xr-xassh9
1 files changed, 7 insertions, 2 deletions
diff --git a/assh b/assh
index 07e75f0..fb4c8b6 100755
--- a/assh
+++ b/assh
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# simple autossh wrapper
+# simple autossh and screen wrapper
#
BASENAME="`basename $0`"
@@ -11,12 +11,17 @@ if [ -z "$DEST" ]; then
exit 1
fi
-if [ "$BASENAME" == "asshs" ]; then
+if [ "$BASENAME" == "asshs" ] || [ "$BASENAME" == "shells" ]; then
+ # Remote screen shell using autossh
if [ "$COMMAND" == "root" ]; then
autossh $DEST -t -- sudo screen -x
else
autossh $DEST -t -- screen -x $COMMAND
fi
+elif [ "$BASENAME" == "shelll" ]; then
+ # Local screen shell
+ wscreen $*
else
+ # Remote shell using autossh
autossh $DEST -t -- $COMMAND
fi