From b4b36bb949fc65ceac2e865b8ba3747a87787bd3 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 6 May 2023 10:02:35 -0500 Subject: [PATCH] Update cc-cleaner.sh --- cc-cleaner.sh | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/cc-cleaner.sh b/cc-cleaner.sh index 1b4ba54..028e868 100755 --- a/cc-cleaner.sh +++ b/cc-cleaner.sh @@ -8,16 +8,16 @@ echo "" echo -e "${idsCL[LightGreen]}Cluster Control Removal Script${idsCL[Default]}" echo "" -# cd ~ -# rm -f ./install-cc -# wget https://severalnines.com/downloads/cmon/install-cc -# chmod +x ./install-cc -# sed -i 's/\/var\/lib\/mysql\/mysql.sock/\/var\/run\/mysqld\/mysqld.sock/g' ./install-cc +cd ~ +rm -f ./install-cc +wget https://severalnines.com/downloads/cmon/install-cc +chmod +x ./install-cc +sed -i 's/\/var\/lib\/mysql\/mysql.sock/\/var\/run\/mysqld\/mysqld.sock/g' ./install-cc read -n 1 -p "Are you sure you wish to remove Cluster Control and all data (Y/n)?" choice case "$choice" in -[Nn]) echo '';; +[Nn]) echo ''; ;; * ) echo '' apt remove --purge -y clustercontrol* @@ -51,16 +51,12 @@ case "$choice" in [Nn]) echo ''; exit 0;; * ) - # ./install-cc - # - # #read -n 1 -p "Login at https://10.10.10.50 and setup the admin user, once complete then press ENTER" choice - # - # /opt/copycerts.sh - # apt install -y mailutils xtrabackup + ./install-cc - read -p "Enter the admin password for MySQL: " pwd - echo "Enter the root password for adding back in the admin user for MySQL:" - mysql -u root -p -e "CREATE USER 'admin'@'%' IDENTIFIED BY '${pwd}';GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION;" + #read -n 1 -p "Login at https://10.10.10.50 and setup the admin user, once complete then press ENTER" choice + + /opt/copycerts.sh + apt install -y mailutils xtrabackup esac