Skip to content

Commit

Permalink
Merge pull request #13 from arkhoss/feat/support-server-password
Browse files Browse the repository at this point in the history
feat/support server password
  • Loading branch information
Danixu authored Mar 26, 2023
2 parents 47cadb9 + 8193cfe commit 0005813
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ This dockerfile converts some env variables to arguments in the server command,

`ADMINPASSWORD:` Sets or changes the admin password. Is mandatory at first startup or will fail. I recommend to remove it once the server is started because the server logs every argument in clear text (if doesn't cares, you can leave it).

`PASSWORD:` Sets or changes server password. Is optional.

`CACHEDIR:` Set the folder where the data will be stored. By default the server stores the data in the Zomboid folder in home directory (/home/steam/Zomboid). Is recommended to store this data into a persistent volume to keep the server state.

`DEBUG:` Enable the debug mode in server
Expand Down
5 changes: 5 additions & 0 deletions scripts/entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ if [ -n "${ADMINPASSWORD}" ]; then
ARGS="${ARGS} -adminpassword ${ADMINPASSWORD}"
fi

# Server password
if [ -n "${PASSWORD}" ]; then
ARGS="${ARGS} -password ${PASSWORD}"
fi

# You can choose a different servername by using this option when starting the server.
if [ -n "${SERVERNAME}" ]; then
ARGS="${ARGS} -servername ${SERVERNAME}"
Expand Down

0 comments on commit 0005813

Please sign in to comment.