From c8eab410d931f7cacbd6d0ee7ce04ca19b009f31 Mon Sep 17 00:00:00 2001 From: Benjamin Sanders Date: Thu, 22 Oct 2026 15:16:33 -0400 Subject: added code to ask to set mysql password --- configure-ace-server.sh | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/configure-ace-server.sh b/configure-ace-server.sh index d1a6742..8b53590 100644 --- a/configure-ace-server.sh +++ b/configure-ace-server.sh @@ -14,6 +14,44 @@ curl -JO https://raw.githubusercontent.com/ACEmulator/ACE/refs/heads/master/dock # Make sure you change both mysql passwords in docker.env curl -JO https://raw.githubusercontent.com/ACEmulator/ACE/refs/heads/master/docker.env +read -s -p "Please specify the MYSQL_ROOT_PASSWORD: " MYSQL_ROOT_PASSWORD +echo "" + +if test "$MYSQL_ROOT_PASSWORD" = ""; then + echo "$0: sorry, password cannot be blank" >&2 + exit 1; +fi + +sed -i -e"s/^MYSQL_ROOT_PASSWORD=.*/MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD/" docker.env + +if test $? -eq 0; then + echo 'MYSQL_ROOT_PASSWORD password set' >&2 +else + echo 'MYSQL_ROOT_PASSWORD set attempt failed' >&2 + exit 1 +fi + +echo "done" >&2 + +read -s -p "Please specify the non-root MYSQL_PASSWORD: " MYSQL_PASSWORD +echo "" + +if test "$MYSQL_PASSWORD" = ""; then + echo "$0: sorry, password cannot be blank" >&2 + exit 1; +fi + +sed -i -e"s/^MYSQL_PASSWORD=.*/MYSQL_PASSWORD=$MYSQL_PASSWORD/" docker.env + +if test $? -eq 0; then + echo 'MYSQL_PASSWORD password set' >&2 +else + echo 'MYSQL_PASSWORD set attempt failed' >&2 + exit 1 +fi + +echo "done" >&2 + # Download ac-updates.zip, you can replace with another version if you want curl -JO "https://drive.anfg.net/public.php/dav/files/AYEETFpMBZ2Qf58/?accept=zip" -- cgit v1.2.3