Skip to content

Commit

Permalink
add ENABLE_COMMUNITY_SERVER to configure for community server
Browse files Browse the repository at this point in the history
  • Loading branch information
octarect committed Jul 30, 2024
1 parent 8f2f116 commit 043a43a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ You can change the settings by use the following environment variables:

### General

| Variable | Type | Default | Description |
|:-------------------|:----:|:--------|:----------------------------------|
| UPDATE_ON_START | bool | `false` | Update a server on startup |
| ENABLE_MULTITHREAD | bool | `true` | Use multi threads to run a server |
| Variable | Type | Default | Description |
|:------------------------|:----:|:--------|:-------------------------------------|
| UPDATE_ON_START | bool | `false` | Update a server on startup |
| ENABLE_MULTITHREAD | bool | `true` | Use multi threads to run a server |
| ENABLE_COMMUNITY_SERVER | bool | `false` | Setup as a community server (public)<br>You may also want to set `PUBLIC_IP` if you host it in LAN. |

### PalWorldSettings.ini

Expand Down
4 changes: 4 additions & 0 deletions scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ SERVER_OPTS="$SERVER_OPTS"
UPDATE_ON_START="${UPDATE_ON_START:-false}"
ENABLE_MULTITHREAD="${ENABLE_MULTITHREAD:-true}"
ENABLE_ENGINE_OPTIMIZATION="${ENABLE_ENGINE_OPTIMIZATION:-false}"
ENABLE_COMMUNITY_SERVER="${ENABLE_COMMUNITY_SERVER:-false}"

steamdo() {
cmd="$@"
Expand Down Expand Up @@ -90,5 +91,8 @@ SERVER_OPTS=()
if [[ "${ENABLE_MULTITHREAD,,}" = "true" ]]; then
SERVER_OPTS+=("-useperfthreads" "-NoAsyncLoadingThread" "-UseMultithreadForDS")
fi
if [[ "${ENABLE_COMMUNITY_SERVER,,}" = "true" ]]; then
SERVER_OPTS+=("-publiclobby")
fi
log "CMD: $INSTALL_DIR/PalServer.sh ${SERVER_OPTS[@]}"
steamdo $INSTALL_DIR/PalServer.sh ${SERVER_OPTS[@]}

0 comments on commit 043a43a

Please sign in to comment.