From 15e2b819a2c077076c4c1d3716333052773e3748 Mon Sep 17 00:00:00 2001 From: Valentin Date: Fri, 23 Feb 2024 17:07:19 +0100 Subject: [PATCH] directus db --- install.sh | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index f5eb28b..66237a1 100644 --- a/install.sh +++ b/install.sh @@ -98,7 +98,6 @@ if [[ "$answer" == "y" ]]; then echo -e "${PURPLE}${BOLD}Enter the MariaDB root password : ${RESET}" read -s db_root_password echo - echo -e "${PURPLE}${BOLD}${db_root_password}${RESET}" apt -y install expect SECURE_MYSQL=$(expect -c " set timeout 3 @@ -110,9 +109,9 @@ if [[ "$answer" == "y" ]]; then expect \"Change the root password? \\[Y/n\\]\" send \"y\r\" expect \"New password:\" - send \"${db_root_password}\r\" + send \"$db_root_password\r\" expect \"Re-enter new password:\" - send \"${db_root_password}\r\" + send \"$db_root_password\r\" expect \"Remove anonymous users?\" send \"y\r\" expect \"Disallow root login remotely?\" @@ -128,8 +127,21 @@ if [[ "$answer" == "y" ]]; then # https://gist.github.com/coderua/5592d95970038944d099 fi +# +# DIRECTUS DB +# + echo -e "${PURPLE}${BOLD}Setup Directus database ? (y/n) ${RESET}" read answer if [[ "$answer" == "y" ]]; then - echo "yooooo" + echo -e "${PURPLE}${BOLD}Generate and store the password somewhere safe${RESET}" + echo -e "${PURPLE}${BOLD}Enter the MariaDB Directus password : ${RESET}" + read -s db_directus_password + echo + mysql -u root -p <