From 7a917cd031652bc1e6841795aa62b5180afb0d15 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 23 Jul 2022 20:17:33 -0500 Subject: [PATCH] Update cc-cleaner.sh --- cc-cleaner.sh | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/cc-cleaner.sh b/cc-cleaner.sh index b940066..b9afdad 100755 --- a/cc-cleaner.sh +++ b/cc-cleaner.sh @@ -8,21 +8,25 @@ echo "" echo -e "${idsCL[LightGreen]}Cluster Control Removal Script${idsCL[Default]}" echo "" +read -n 1 -p "Are you sure you wish to remove Cluster Control and all data (Y/n)?" choice +case "$choice" in +[Nn]) exit 0;; +* ) + apt remove --purge clustercontrol* + apt remove --purge mysql-server* + apt remove --purge "mysql*" "*s9s*" apache2 "php*" -apt remove --purge clustercontrol* -apt remove --purge mysql-server* -apt remove --purge "mysql*" "*s9s*" apache2 "php*" + apt --purge autoremove + apt clean -apt --purge autoremove -apt clean + rm -Rf /etc/cmon.d + rm -Rf /var/www/clustercontrol + rm -Rf /var/lib/cmon + rm -Rf /var/lib/prometheus + rm -Rf /etc/apache2 + rm -Rf /var/www + rm -Rf /etc/php -rm -Rf /etc/cmon.d -rm -Rf /var/www/clustercontrol -rm -Rf /var/lib/cmon -rm -Rf /var/lib/prometheus -rm -Rf /etc/apache2 -rm -Rf /var/www -rm -Rf /etc/php - -install-cc uninstall + install-cc uninstall;; +esac