From 0afbb0cf3e3965bf30a18e1aa8443f0eeb768442 Mon Sep 17 00:00:00 2001 From: Teddysun Date: Wed, 11 Dec 2024 23:30:59 +0900 Subject: [PATCH] Update comments Signed-off-by: Teddysun --- conf/lamp | 21 +++++++++++---------- lamp.sh | 15 +++++++++++---- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/conf/lamp b/conf/lamp index 979143e8..212ea610 100644 --- a/conf/lamp +++ b/conf/lamp @@ -467,17 +467,18 @@ del_vhost() { } make_temp_mycnf() { - cat >/root/.my.cnf</tmp/.my.cnf</tmp/.mysql.tmp chmod 600 /tmp/.mysql.tmp - /usr/bin/mariadb --defaults-file="/root/.my.cnf" /dev/null 2>&1; then + if /usr/bin/mariadb --defaults-file="/tmp/.my.cnf" /dev/null 2>&1; then _info "Add database $(_green "${database_name}") sucessfully." else _info "Add database $(_red "${database_name}") failed." @@ -545,7 +546,7 @@ EOF } list_database() { - if /usr/bin/mariadb --defaults-file="/root/.my.cnf" -e "SHOW DATABASES;"; then + if /usr/bin/mariadb --defaults-file="/tmp/.my.cnf" -e "SHOW DATABASES;"; then _info "List all databases sucessfully." else _info "List all databases failed." @@ -567,7 +568,7 @@ DROP USER '${database_name}'@'localhost'; DROP DATABASE \`${database_name}\`; FLUSH PRIVILEGES; EOF - if /usr/bin/mariadb --defaults-file="/root/.my.cnf" /etc/mysql/debian-start </etc/mysql/debian.cnf <