aboutsummaryrefslogtreecommitdiff
path: root/assh
diff options
context:
space:
mode:
Diffstat (limited to 'assh')
-rwxr-xr-xassh18
1 files changed, 18 insertions, 0 deletions
diff --git a/assh b/assh
new file mode 100755
index 0000000..e3c8ebd
--- /dev/null
+++ b/assh
@@ -0,0 +1,18 @@
+#!/bin/bash
+#
+# simple autossh wrapper
+#
+
+BASENAME="`basename $0`"
+DEST="$1"
+COMMAND="$2"
+
+if [ -z "$DEST" ]; then
+ exit 1
+fi
+
+if [ "$BASENAME" == "asshs" ]; then
+ autossh $DEST.`facter domain` -t -- screen -x $COMMAND
+else
+ autossh $DEST.`facter domain` -t -- $COMMAND
+fi