- fi
-else
- if [ ! -d environments.yaml ]; then
- cp ~/joid_config/environments.yaml ./environments.yaml || true
- cp ~/.juju/environments.yaml ./environments.yaml || true
- fi
-fi
-
-
-if [[ "$jujuver" > "2" ]]; then
- controllername=`awk 'NR==1{print substr($1, 1, length($1)-1)}' deployconfig.yaml`
- cloudname=`awk 'NR==1{print substr($1, 1, length($1)-1)}' deployconfig.yaml`
- juju kill-controller $controllername --timeout 10s -y || true
- rm -rf precise
- rm -rf trusty
- rm -rf xenial
- sleep 30
- sudo sysctl -w vm.drop_caches=3
-elif [ -d $HOME/.juju/environments ]; then
- echo " " > status.txt
- juju status &>>status.txt || true
- if [ "$(grep -c "environment is not bootstrapped" status.txt )" -ge 1 ]; then
- echo " environment is not bootstrapped ..."