summaryrefslogtreecommitdiff
path: root/src/manage.sh
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2012-10-16 02:43:30 +0200
committerChristian Pointner <equinox@spreadspace.org>2012-10-16 02:43:30 +0200
commit176d443bda49cee59aef1d5e54d7a92b7396e795 (patch)
tree53a05929575e300af35b606573a2257058518733 /src/manage.sh
parentflufigut clean works now (diff)
wipe works now
Diffstat (limited to 'src/manage.sh')
-rwxr-xr-xsrc/manage.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/manage.sh b/src/manage.sh
index 92596af..29d0c85 100755
--- a/src/manage.sh
+++ b/src/manage.sh
@@ -65,6 +65,13 @@ clean_all() {
done
}
+wipe_all() {
+ for machine in `grep "^Host" ssh.config | awk '{ print($2) }'`; do
+ echo "wipeing files belonging to planet '$1' from $machine ... "
+ ssh -i "$SSH_KEY" -F "$SSH_CONFIG" $SSH_USER@"$machine" wipe "$1"
+ done
+}
+
generate_instance_list() {
machine=$1
@@ -135,9 +142,10 @@ case "$1" in
wipe)
if [ -z "$2" ]; then
echo "Usage: $0 wipe <planet name>"
+ exit 1
fi
echo "wipeing configuration for from all machines inside ssh-config ..."
- wipe_all
+ wipe_all "$2"
;;
start)
echo "Start manager and worker on all machines ..."