add rsync scripts
authorRazvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Sun, 21 Nov 2010 19:52:10 +0000 (21:52 +0200)
committerRazvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Sun, 21 Nov 2010 19:52:10 +0000 (21:52 +0200)
all_base_rsync [new file with mode: 0755]
ct_rsync [new file with mode: 0755]

diff --git a/all_base_rsync b/all_base_rsync
new file mode 100755 (executable)
index 0000000..885e044
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+ip_array=(141.85.224.201 141.85.224.203 141.85.224.204 141.85.224.205 141.85.224.206 141.85.224.207 141.85.224.208 141.85.224.209 141.85.224.210)
+
+for ip in ${ip_array[@]}; do
+       ./ct_rsync $ip 22
+done
diff --git a/ct_rsync b/ct_rsync
new file mode 100755 (executable)
index 0000000..2db3067
--- /dev/null
+++ b/ct_rsync
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+if test $# -ne 2; then
+       echo "Usage: $0 hostname port" 1>&2
+       exit 1
+fi
+
+host=$1
+port=$2
+
+rsync -avz -e "ssh -p $port" . p2p@$host:razvan/scripts/