[sysadmin-bin] signal-ftp-sync: Taken from window and modified to rely on sudo



commit e253fec5ac6fcd4a2fa9ecd59abe1e5e272f0d33
Author: Olav Vitters <olav vitters nl>
Date:   Sun Feb 27 21:48:03 2011 +0100

    signal-ftp-sync: Taken from window and modified to rely on sudo

 signal-ftp-sync |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/signal-ftp-sync b/signal-ftp-sync
new file mode 100755
index 0000000..1bb9852
--- /dev/null
+++ b/signal-ftp-sync
@@ -0,0 +1,15 @@
+#!/bin/sh
+# This script is called to signal the remote host that it is time to
+# mirror the archive.
+
+if [ "`whoami`" != gnomeftp ] ; then
+    cd / && exec sudo -u gnomeftp /usr/local/bin/signal-ftp-sync "$@"
+fi
+
+signal () {
+    echo Signalling $1
+    ssh -o"BatchMode yes" -o"ForwardAgent no" -o"ForwardX11 no" -o"user $2" -f "$1" sleep 1
+}
+
+signal churchill.acc.umu.se ftp-gnom
+#signal tiktok.planetmirror.com mirror



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]