diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-06-01 17:57:24 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-06-01 17:57:24 -0300 |
commit | e0db44e7878715f054af351772ec2d309f8c8eb0 (patch) | |
tree | 2e0c74f23901499fc43f1248298e3c88cdb96467 | |
parent | 414b5566eea57f535b09c8cce339cf6e714f3f0b (diff) | |
download | scripts-e0db44e7878715f054af351772ec2d309f8c8eb0.tar.gz scripts-e0db44e7878715f054af351772ec2d309f8c8eb0.tar.bz2 |
Shell wrapper
-rwxr-xr-x | assh | 9 | ||||
l--------- | shell | 1 | ||||
l--------- | shelll | 1 | ||||
l--------- | shells | 1 |
4 files changed, 10 insertions, 2 deletions
@@ -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 @@ -0,0 +1 @@ +assh
\ No newline at end of file @@ -0,0 +1 @@ +assh
\ No newline at end of file @@ -0,0 +1 @@ +assh
\ No newline at end of file |