feat(draft): catch split text settings and owner-editable game ports
Two problems a draft can boot fine with but break once an owner changes a
setting, both in the builder's Valheim draft:
- splitSettings: text settings used unquoted on the command line, directly
or through ARGS="-name ${SERVER_NAME}"; ./server $ARGS, so "GBRHosting -
My Server" reaches the game as several arguments. Suggests quoting or a
bash array.
- portSettings: game-port settings whose default isn't in defaultPorts, or
that owners can change although nodes always publish the same container
port. Internal ports (RCON, REST) and {PUBLIC_PORT_n} values are left out.
Both run on drafts only; AUTHORING.md gets the matching rules.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c75190d8c4
commit
c2b22d3955
4 files changed
+365
No files matched your search
@@ -41,6 +41,9 @@ Know this before writing anything:
|
||||
- `defaultPorts` lists **only what players connect to** (game and query ports). RCON, REST and admin
|
||||
ports are **never** published.
|
||||
- Use `"7777/udp"` or `"8211:8211/udp"`. Every port needs its protocol.
|
||||
- Nodes always publish these container ports (only the host side moves when servers share a node).
|
||||
So the game's own port is **not a setting**: write it into the startup command or config file. A
|
||||
game that must announce the port players use gets `{PUBLIC_PORT_<port>}`.
|
||||
|
||||
### The container user
|
||||
- Run `gbrgames inspect-image -game <id>`. If the image is built around its own user (it declares
|
||||
@@ -51,6 +54,9 @@ Know this before writing anything:
|
||||
- Read settings under the names the agent gives them (see above). `${RCON_PORT}` when the setting is
|
||||
`RCONPort` silently ignores the owner's value; it arrives as `RCONPORT`.
|
||||
- Use `${VAR:-default}` for anything that may be unset.
|
||||
- Quote text settings where they're used: `-name "${SERVER_NAME}"`. `ARGS="-name ${SERVER_NAME}"; ./server $ARGS`
|
||||
splits "GBRHosting - My Server" into words; build optional arguments in a bash array instead
|
||||
(`args=(-name "$SERVER_NAME"); [ -n "$PASSWORD" ] && args+=(-password "$PASSWORD"); ./server "${args[@]}"`).
|
||||
- If the image installs the game itself on start, make sure a failed install is retried rather than
|
||||
starting a server that isn't there (see ARK's template).
|
||||
|
||||
|
||||
Reference in new issue
Block a user