From 8091987b77263fc1c12daa668c6d296610e08ecf Mon Sep 17 00:00:00 2001 From: P2P-Next Date: Wed, 18 Aug 2010 16:48:49 +0300 Subject: [PATCH] Utils: add sync_single_cluster.sh script; update sync_cluster.sh script to call sync_single_cluster.sh --- Utils/sync_cluster.sh | 13 +++---------- Utils/sync_single_cluster.sh | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 10 deletions(-) create mode 100755 Utils/sync_single_cluster.sh diff --git a/Utils/sync_cluster.sh b/Utils/sync_cluster.sh index 2af39f6..1ac756d 100755 --- a/Utils/sync_cluster.sh +++ b/Utils/sync_cluster.sh @@ -11,13 +11,6 @@ else source ../ControlScripts/globalconfig fi -rsync -avP --del $P2P_NEXT_REL_PATH p2p@p2p-next-01.grid.pub.ro:/home/p2p/george/P2P-Next -rsync -avP --del $P2P_NEXT_REL_PATH p2p@p2p-next-03.grid.pub.ro:/home/p2p/george/P2P-Next -rsync -avP --del $P2P_NEXT_REL_PATH p2p@p2p-next-04.grid.pub.ro:/home/p2p/george/P2P-Next -rsync -avP --del $P2P_NEXT_REL_PATH p2p@p2p-next-05.grid.pub.ro:/home/p2p/george/P2P-Next -rsync -avP --del $P2P_NEXT_REL_PATH p2p@p2p-next-06.grid.pub.ro:/home/p2p/george/P2P-Next -rsync -avP --del $P2P_NEXT_REL_PATH p2p@p2p-next-07.grid.pub.ro:/home/p2p/george/P2P-Next -rsync -avP --del $P2P_NEXT_REL_PATH p2p@p2p-next-08.grid.pub.ro:/home/p2p/george/P2P-Next -rsync -avP --del $P2P_NEXT_REL_PATH p2p@p2p-next-09.grid.pub.ro:/home/p2p/george/P2P-Next -rsync -avP --del $P2P_NEXT_REL_PATH p2p@p2p-next-10.grid.pub.ro:/home/p2p/george/P2P-Next - +for host in p2p-next-01.grid.pub.ro p2p-next-03.grid.pub.ro p2p-next-04.grid.pub.ro p2p-next-05.grid.pub.ro p2p-next-06.grid.pub.ro p2p-next-07.grid.pub.ro p2p-next-08.grid.pub.ro p2p-next-09.grid.pub.ro p2p-next-10.grid.pub.ro; do + ./sync_single_cluster.sh $host +done diff --git a/Utils/sync_single_cluster.sh b/Utils/sync_single_cluster.sh new file mode 100755 index 0000000..77c7944 --- /dev/null +++ b/Utils/sync_single_cluster.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Copyright: George Milescu 2010 - george.milescu@gmail.com +# +# 2010, Razvan Deaconescu, razvan.deaconescu@cs.pub.ro + +if test $# -ne 1; then + echo "Usage: $0 remote-system" 1>&2 + exit 1 +fi + +# Read the global configuration file +# Check if the global configuration file exists +if [ ! -e ../ControlScripts/globalconfig ]; then + echo "Warning: The global config file ../ControlScripts/globalconfig does not exist." +else + source ../ControlScripts/globalconfig +fi + +remote_system=$1 + +rsync -avP --del $P2P_NEXT_REL_PATH/P2P-Testing-Infrastructure p2p@${remote_system}:/home/p2p/george/P2P-Next/ -- 2.20.1