server content features improved

This commit is contained in:
Frank Harris 2026-06-18 10:04:36 -05:00
parent a28d3e1a4f
commit 8a56ddc83c
7 changed files with 464 additions and 3 deletions

View file

@ -0,0 +1,90 @@
# Server Content Application Hooks
Server Content Application Hooks let installed server content manage companion
applications such as BEC, Big Brother Bot, Discord bridges, RCON tools, and log
watchers as part of the game server lifecycle.
The application files may live wherever the game requires them. GSP lifecycle
metadata lives under each server home:
```text
_gsp_content/
hooks/
generated/
runtime/
```
## Content Type
The Server Content Manager includes the `Server-side Application` content type.
When this type is installed, the Panel writes a JSON hook manifest to:
```text
_gsp_content/hooks/<app>.json
```
The agents read these manifests during server startup.
## Hook Manifest
```json
{
"name": "BEC",
"enabled": true,
"platform": "windows",
"working_dir": "bec",
"start_command": "BEC.exe -f Config.cfg",
"stop_command": "",
"start_timing": "before_server",
"stop_with_server": true,
"watch": true,
"critical": true,
"kill_game_if_app_exits": false,
"restart_app_if_exits": true,
"pid_name": "bec",
"app_name": "BEC.exe",
"description": "Battleye Extended Controls watchdog for DayZ/Arma servers"
}
```
Supported `platform` values are `windows`, `linux`, and `both`.
Supported `start_timing` values are `before_server` and `after_server`.
## Runtime PID File
Agents write hook runtime PIDs to:
```text
_gsp_content/runtime/server_content.pids
```
Format:
```text
watchdog|BEC|12345
app|BEC|12346
```
The main game server watchdog PID is not stored in this file.
## Lifecycle
On server start, the agent:
1. Creates `_gsp_content/hooks`, `_gsp_content/generated`, and `_gsp_content/runtime`.
2. Reads enabled hook manifests matching the agent platform.
3. Generates platform-specific hook watchdog scripts.
4. Starts `before_server` hooks.
5. Starts the game server.
6. Starts `after_server` hooks.
7. Cleans up hook watchdogs and apps when the game server exits.
On Panel Stop or Restart, agents kill hook watchdog PIDs first and hook app PIDs
second, then continue normal game process and screen/session cleanup.
## Legacy `_alsoRun.bat`
Windows `_alsoRun.bat` support remains for compatibility, but it is deprecated.
New companion applications should be installed as `Server-side Application`
content so both Linux and Windows agents can manage them through the same hook
contract.

View file

@ -33,10 +33,31 @@ The module can already represent several content types, including:
- downloads/extracted packages
- post-script driven installs
- config packs
- server-side applications with lifecycle hooks
- future profile-type content
Steam Workshop is no longer a user-facing Server Content category. Workshop access belongs to the dedicated `steam_workshop` module.
## Server-Side Applications
`Server-side Application` content writes an agent-readable hook manifest under
the target game home:
```text
_gsp_content/hooks/<app>.json
```
The agents generate runtime watchdog scripts in `_gsp_content/generated/` and
track side-application PIDs in `_gsp_content/runtime/server_content.pids`.
Use this type for companion applications such as BEC, Big Brother Bot, Discord
bridges, RCON tools, and log watchers. The application files themselves may
still be installed wherever the game requires them.
Detailed lifecycle documentation:
- `docs/features/SERVER_CONTENT_APPLICATION_HOOKS.md`
## Current Limitations
- Cache and cleanup policy need a clearer product design.
@ -56,6 +77,7 @@ This module is the right place for:
- add-ons
- config packs
- script-driven installs
- server-side companion application hooks
- server content manifests
- install history