From 70fdcf95d1ff3c002f496516ab59e4c23d655262 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Tue, 16 Oct 2012 02:21:33 +0200 Subject: flufigut clean works now --- src/manage.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/manage.sh') diff --git a/src/manage.sh b/src/manage.sh index 3ac0303..92596af 100755 --- a/src/manage.sh +++ b/src/manage.sh @@ -54,6 +54,17 @@ deploy_all() { done } +clean_all() { + for machine in "$OUTPUT_DIR"/*; do + if [ -d "$machine" ]; then + machine=`basename $machine` + echo "removing files from $machine ... " + generate_instance_list $machine + ssh -i "$SSH_KEY" -F "$SSH_CONFIG" $SSH_USER@"$machine" remove < "$OUTPUT_DIR/$machine.list" + fi + done +} + generate_instance_list() { machine=$1 @@ -117,6 +128,17 @@ case "$1" in echo "Deploying configuration to all machines ..." deploy_all ;; + clean) + echo "cleaning/removing configuration from all machines ..." + clean_all + ;; + wipe) + if [ -z "$2" ]; then + echo "Usage: $0 wipe " + fi + echo "wipeing configuration for from all machines inside ssh-config ..." + wipe_all + ;; start) echo "Start manager and worker on all machines ..." start_all -- cgit v1.2.3