summaryrefslogtreecommitdiff
diff options
authorAdam Stokes <[email protected]>2018-06-19 12:24:22 -0400
committerAdam Stokes <[email protected]>2018-06-19 12:24:22 -0400
commitbc33f82143d01f22f33f0edd57fe039d653dc367 (patch)
treef87e4bb5ce0358e402d752ab41d30e6a422df6c0
parent43633e26551f84658cee8c4b0c1157c174b0801a (diff)
Cleanup removal messages
Signed-off-by: Adam Stokes <[email protected]>
-rwxr-xr-xdebian/postrm12
-rwxr-xr-xkubernetes3
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
diff --git a/kubernetes b/kubernetes
index 2b7a695..19e21a9 100755
--- a/kubernetes
+++ b/kubernetes
@@ -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")