From d7f2c6c64bd3bec267fbd5a2351328ed576d3fb0 Mon Sep 17 00:00:00 2001 From: David Young Date: Fri, 10 Apr 2026 11:36:27 -0600 Subject: [PATCH] start mariadb --- install.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/install.sh b/install.sh index 49bd4f8..07aff0f 100755 --- a/install.sh +++ b/install.sh @@ -92,6 +92,22 @@ source packages.conf echo "Installing servers..." install_packages "${SERVERS[@]}" +# Initialize and start MariaDB if not already running +if ! systemctl is-active --quiet mariadb; then + if [ ! -d /var/lib/mysql/mysql ]; then + echo "Initializing MariaDB..." + sudo mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql + fi + echo "Starting MariaDB..." + sudo systemctl enable --now mariadb +fi + +# Start Apache if not already running +if ! systemctl is-active --quiet httpd; then + echo "Starting Apache..." + sudo systemctl enable --now httpd +fi + echo "Installing utilities..." install_packages "${UTILITIES[@]}"