add uninstall script.

This commit is contained in:
Simon Larsen 2022-11-07 22:21:36 +00:00
parent b45876cf6e
commit 522ffad4d3
No known key found for this signature in database
GPG Key ID: AB45983AA9C81CDE

View File

@ -1,7 +1,20 @@
#!/bin/bash
echo "REMOVING EXISTING CONTAINERS..."
echo "Uninstall OneUptime. This will remove OneUptime from this server"
read -r -p "Do you want to uninstall OneUptime? [y/N] " response
if [[ "$response" =~ ^([yY][eE][sS]|[yY])+$ ]]
then
echo "OK!"
else
exit
fi
echo "Uninstalling OneUptime..."
sudo docker-compose down
sudo docker stop $(sudo docker ps -aq) || echo 'No docker containers'
sudo docker rm $(sudo docker ps -aq) || echo 'No docker containers'
echo "EXISTING CONTAINERS REMOVED."
sudo docker-compose rm
echo "OneUptime uninstalled."
echo "We would like to hear your feedback to make this product better for you and for other users, please email us at hello@oneuptime.com."
echo " - If you notice a bug, we will fix it for you."
echo " - If you need a feature, we will add that to the roadmap and let you know the estimated time to ship."
echo "We would love to hear your feedback. Email: hello@oneuptime.com"