diff options
Diffstat (limited to 'ci/cleanmaas.sh')
-rwxr-xr-x | ci/cleanmaas.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ci/cleanmaas.sh b/ci/cleanmaas.sh new file mode 100755 index 00000000..40961359 --- /dev/null +++ b/ci/cleanmaas.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -ex + +maasver=$(apt-cache policy maas | grep Installed | cut -d ':' -f 2 | sed -e 's/^.*: //') + +if [[ "$maasver" > "2" ]]; then + echo "removing existing maas ..." + sudo apt-get purge maas maas-cli maas-common maas-dhcp maas-dns maas-proxy maas-rack-controller maas-region-api maas-region-controller -y + sudo rm -rf /var/lib/maas +fi |