diff options
| -rw-r--r-- | configure-ace-server.sh | 38 |
1 files changed, 38 insertions, 0 deletions
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" |
