summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorJoerg Jaspert <joerg@debian.org>2008-10-19 01:06:19 +0200
committerJoerg Jaspert <joerg@debian.org>2008-10-19 01:06:19 +0200
commit3447941eab35bbf9bc7ed4e68cdd884b202898d7 (patch)
treeda88d5b164ee4ea181f50a265339eb8a0b620412 /etc
parent41667f692cfd165e59ee00e53baaead7b9400f4f (diff)
ftpsync
Add remote command options and callback. Also move functions to one single place. Signed-off-by: Joerg Jaspert <joerg@debian.org>
Diffstat (limited to 'etc')
-rw-r--r--etc/common6
1 files changed, 6 insertions, 0 deletions
diff --git a/etc/common b/etc/common
index 6d06489..4a63492 100644
--- a/etc/common
+++ b/etc/common
@@ -31,6 +31,12 @@ signal () {
ssh $SSH_OPTIONS -i "$5" -o"user $3" -$4 "$2" sleep 1 >>${LOGDIR}/$1.log 2>&1 &
}
+# callback, used by ftpsync
+callback () {
+ # Defaults we always want, no matter what
+ SSH_OPTIONS="-o BatchMode=yes -o SetupTimeOut=45 -o ConnectTimeout=45 -o PasswordAuthentication=no"
+ ssh $SSH_OPTIONS -i "$3" -o"user $1" "$2" callback:${HOSTNAME}
+}
# log something (basically echo it together with a timestamp)
#