diff options
| author | Adam Stokes <[email protected]> | 2018-06-19 12:24:22 -0400 |
|---|---|---|
| committer | Adam Stokes <[email protected]> | 2018-06-19 12:24:22 -0400 |
| commit | bc33f82143d01f22f33f0edd57fe039d653dc367 (patch) | |
| tree | f87e4bb5ce0358e402d752ab41d30e6a422df6c0 | |
| parent | 43633e26551f84658cee8c4b0c1157c174b0801a (diff) | |
Cleanup removal messages
Signed-off-by: Adam Stokes <[email protected]>
| -rwxr-xr-x | debian/postrm | 12 | ||||
| -rwxr-xr-x | kubernetes | 3 |
2 files changed, 11 insertions, 4 deletions
diff --git a/debian/postrm b/debian/postrm index 8e06ebb..354d824 100755 --- a/debian/postrm +++ b/debian/postrm @@ -2,7 +2,11 @@ set -e -if $(snap list|grep -q 'microk8s'); then +if [ "$1" != "remove" ]; then + exit 0 +fi + +if $(snap list|grep -q 'microk8s') >/dev/null; then echo "The kubernetes package has been removed, however, microk8s" echo "is still installed and running on the system." echo "" @@ -10,10 +14,10 @@ if $(snap list|grep -q 'microk8s'); then echo "" fi -if $(snap list|grep -q 'conjure-up'); then +if $(snap list|grep -q 'conjure-up') >/dev/null; then echo "The kubernetes package has been removed, however, conjure-up" echo "is still installed on the system." - if $(juju models|grep -q 'conjure'); then + if $(juju controllers >/dev/null 2>&1) && $(juju models|grep -q 'conjure'); then echo "" echo "Additionally, conjure-up has deployed juju controllers and models." echo "If those are no longer needed, please run 'juju destroy-model <model-name>' and" @@ -26,3 +30,5 @@ if $(snap list|grep -q 'conjure-up'); then fi #DEBHELPER# + +exit 0 @@ -48,7 +48,8 @@ case ${args[0]} in ;; "microk8s") echo "Fetching components..." - sudo snap install microk8s --beta --classic + sudo snap install conjure-up --classic + conjure-up microk8s break ;; "Quit") |
