diff options
author | Christian Pointner <equinox@spreadspace.org> | 2012-10-16 02:21:33 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2012-10-16 02:21:33 +0200 |
commit | 70fdcf95d1ff3c002f496516ab59e4c23d655262 (patch) | |
tree | 698a281f64dbdf099e21d31efabbdfef7448e045 /src/manage.sh | |
parent | updated TODO (diff) |
flufigut clean works now
Diffstat (limited to 'src/manage.sh')
-rwxr-xr-x | src/manage.sh | 22 |
1 files changed, 22 insertions, 0 deletions
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 <planet name>" + fi + echo "wipeing configuration for from all machines inside ssh-config ..." + wipe_all + ;; start) echo "Start manager and worker on all machines ..." start_all |