blob: 33e2caec45effa7d05454a2386e7c0ae86a2e94e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/bash
#
# simple autossh wrapper
#
BASENAME="`basename $0`"
DEST="$1"
COMMAND="$2"
if [ -z "$DEST" ]; then
exit 1
fi
if [ "$BASENAME" == "asshs" ]; then
if [ "$COMMAND" == "root" ]; then
autossh $DEST.`facter domain` -t -- sudo screen -x
else
autossh $DEST.`facter domain` -t -- screen -x $COMMAND
fi
else
autossh $DEST.`facter domain` -t -- $COMMAND
fi
|