From fb9317a0a527d14d45b43c3debee3a7a9958be92 Mon Sep 17 00:00:00 2001 From: Stefan Pejcic Date: Thu, 9 May 2024 10:10:14 +0200 Subject: [PATCH] Update INSTALL.sh --- INSTALL.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/INSTALL.sh b/INSTALL.sh index d915935..26f0139 100644 --- a/INSTALL.sh +++ b/INSTALL.sh @@ -642,6 +642,13 @@ run_mysql_docker_container() { # set random password MYSQL_ROOT_PASSWORD=$(openssl rand -base64 -hex 9) + if [ "$REPAIR" = true ]; then + docker stop openpanel_mysql + docker rm openpanel_mysql + docker volume rm openpanel_mysql + fi + + # run the container docker pull mysql > /dev/null 2>&1 docker run -d -p 3306:3306 --name openpanel_mysql \ @@ -657,6 +664,10 @@ run_mysql_docker_container() { # show password echo "Generated MySQL password: $MYSQL_ROOT_PASSWORD" + if [ "$REPAIR" = true ]; then + rm /etc/my.cnf + fi + ln -s /usr/local/admin/db.cnf /etc/my.cnf # Update configuration files with new password