From e0db44e7878715f054af351772ec2d309f8c8eb0 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 1 Jun 2013 17:57:24 -0300 Subject: Shell wrapper --- assh | 9 +++++++-- shell | 1 + shelll | 1 + shells | 1 + 4 files changed, 10 insertions(+), 2 deletions(-) create mode 120000 shell create mode 120000 shelll create mode 120000 shells 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 diff --git a/shell b/shell new file mode 120000 index 0000000..daa19ce --- /dev/null +++ b/shell @@ -0,0 +1 @@ +assh \ No newline at end of file diff --git a/shelll b/shelll new file mode 120000 index 0000000..daa19ce --- /dev/null +++ b/shelll @@ -0,0 +1 @@ +assh \ No newline at end of file diff --git a/shells b/shells new file mode 120000 index 0000000..daa19ce --- /dev/null +++ b/shells @@ -0,0 +1 @@ +assh \ No newline at end of file -- cgit v1.2.3