-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathuninstall.sh
executable file
·49 lines (40 loc) · 1.33 KB
/
uninstall.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
echo "Uninstalling Cloudify :("
echo -n "Deleting application folder..."
rm -rf /opt/Cloudify
echo "Done"
echo -n "Removing executables..."
rm -f /usr/bin/cloudify
rm -f /usr/bin/cloudify-uninstall
echo "Done"
echo -n "Removing old deploy files..."
rm -rf /tmp/Cloudify
echo "Done"
echo "Do you want to remove the 'kod' namespace too?"
echo -n "WARNING: this will remove the 'Persistent Volume Claims' "
echo -n "from k8s and all the remote saved files (if any) for each "
echo "application WILL BE LOST!!!"
echo -n "If you want to, "
while true; do
read -p "please type 'yes' otherwise type 'no' ==> " -r reply
if [[ $reply == "yes" ]]; then
echo -n "Deleting kod namespace..."
sudo -u $SUDO_USER KUBECONFIG=$KUBECONFIG kubectl delete namespace kod &>/dev/null
echo "Done"
break;
elif [[ $reply == "no" ]]; then
echo "The kod namespaced will not be deleted"
break;
fi
done
echo "KubernetesOnDesktop succesfully uninstalled."
echo ""
echo "WARNING:"
echo "If you added your user in the 'docker' group after the cloudify installation"
echo "and you don't need it anymore, please remember to remove it from 'docker' group"
echo "(e.g. by using 'gpasswd -d $SUDO_USER docker' command and logout/login the account"
echo "to take effect)."