~ggouzi/obinstall/obinstall

« back to all changes in this revision

Viewing changes to demos/99-cleanup.sh

  • Committer: MMorana
  • Date: 2016-03-24 01:18:40 UTC
  • Revision ID: mass@ubuntu.com-20160324011840-blxydmf7ca4ggle0
Splitting out demos from install

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
 
3
 
#run the generic scipt from orange-box, if it is installed, otherwise re-implement it here.
4
 
[ -e /usr/bin/orange-box-destroy-juju ] && orange-box-destroy-juju && exit
5
 
 
6
 
ENVIRONMENT=`juju env`
7
 
 
8
 
orangebox_number=$(hostname | cut -c 10- -)
9
 
 
10
 
#Destroy everything
11
 
juju destroy-environment $ENVIRONMENT
12
 
rm -rf ~/.juju/environments
13
 
export AMT_PASSWORD=Password1+
14
 
for i in $(seq 11 20); do
15
 
        yes | amttool 172.27.${orangebox_number}.$i powerdown >/dev/null 2>&1
16
 
done
17
 
 
18
 
exit