diff options
| author | Benjamin Sanders <hello@bensanders.net> | 2026-10-22 15:16:33 -0400 |
|---|---|---|
| committer | Benjamin Sanders <hello@bensanders.net> | 2026-10-22 15:16:33 -0400 |
| commit | c8eab410d931f7cacbd6d0ee7ce04ca19b009f31 (patch) | |
| tree | 6a8ee01553eff4bf058c32068fd7eac742e3f9af /configure-ace-server.sh | |
| parent | abb043f03c194638f28344b2e3a20d97265dcfc9 (diff) | |
added code to ask to set mysql password
Diffstat (limited to 'configure-ace-server.sh')
| -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" |
