From 46d83226f8b1f9f0e2023e455bf21f55d3017a2c Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 20 Sep 2022 13:03:29 -0400 Subject: [PATCH] Update mariadb-install.sh Make installing Adminer an option --- setup/mariadb-install.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/setup/mariadb-install.sh b/setup/mariadb-install.sh index c9025669..15acb821 100644 --- a/setup/mariadb-install.sh +++ b/setup/mariadb-install.sh @@ -79,11 +79,21 @@ apt-get update >/dev/null apt-get install -y mariadb-server &>/dev/null msg_ok "Installed MariaDB" +read -r -p "Would you like to add Adminer? " prompt +if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]] +then +ADMINER="Y" +else +ADMINER="N" +fi + +if [[ $ADMINER == "Y" ]]; then msg_info "Installing Adminer" sudo apt install adminer -y &>/dev/null sudo a2enconf adminer &>/dev/null sudo systemctl reload apache2 &>/dev/null msg_ok "Installed Adminer" +fi PASS=$(grep -w "root" /etc/shadow | cut -b6); if [[ $PASS != $ ]]; then @@ -106,7 +116,4 @@ msg_ok "Customized Container" msg_info "Cleaning up" apt-get autoremove >/dev/null apt-get autoclean >/dev/null -rm -rf /var/{cache,log}/* /var/lib/apt/lists/* -mkdir /var/log/apache2 -chmod 750 /var/log/apache2 msg_ok "Cleaned"