~ajkavanagh/+junk/useful-things

« back to all changes in this revision

Viewing changes to scripts/kill_charms.sh

  • Committer: Alex Kavanagh
  • Date: 2017-09-22 18:17:32 UTC
  • Revision ID: alex.kavanagh@canonical.com-20170922181732-13snyy8l8d02ewy2
Moved the scripts to vcsh-scripts for consistency

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
 
3
 
for charm in $1
4
 
do
5
 
    juju destroy-service ${charm}
6
 
done
7
 
 
8
 
for charm in $1
9
 
do
10
 
    while true; do
11
 
        JS_OUT=$(juju status ${charm} --format=short | \
12
 
                 sed -e 's!^.*new available version.*!!' | grep -vE '^$')
13
 
        if [[ -z $JS_OUT ]]; then
14
 
            exit 0
15
 
        fi
16
 
        echo "!$JS_OUT!"
17
 
        sleep 3
18
 
    done
19
 
done