aboutsummaryrefslogtreecommitdiff
path: root/assh
blob: e3c8ebdf5771d60ce438f8ebc0076b6fa3d9b946 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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