46 lines
2.6 KiB
Markdown
46 lines
2.6 KiB
Markdown
# GSP Windows Agent
|
||
|
||
Cygwin-based agent that lets the GameServer Panel manage Windows Server 2019/2022 hosts. It mirrors the Linux agent feature set: signed RPC transport, GNU Screen session management, and SteamCMD-aware installers.
|
||
|
||
## Highlights
|
||
|
||
- One-click installer (`Install/onceinstall_agent.bat`) that bootstraps Cygwin, required packages, and the `gameserver` service account.
|
||
- Task Scheduler entry that keeps the agent running after reboots.
|
||
- Helper scripts (`agent_conf.sh`, `rebase_post_ins.bat`, etc.) for maintaining the environment.
|
||
- Markdown documentation under [`documentation/agent-guide.md`](documentation/agent-guide.md).
|
||
|
||
## Quick start
|
||
|
||
1. Clone or download the repository to `C:\\gsp-agent`.
|
||
2. Right-click `Install\\onceinstall_agent.bat` → “Run as administrator”.
|
||
3. Open the bundled Cygwin terminal and configure the agent:
|
||
```bash
|
||
cd /OGP
|
||
bash agent_conf.sh -p "gameserverPassword"
|
||
```
|
||
4. Edit `C:\\OGP\\Cfg\\Config.pm` so it matches the server entry you created in the GameServer Panel.
|
||
5. Start the “OGP agent start on boot” scheduled task (or reboot).
|
||
|
||
## Startup and auto-update
|
||
|
||
Use `C:\\OGP64\\agent_start.bat` or `C:\\OGP64\\OGP\\Install\\agent_start.bat` to start the agent manually. The launcher checks the bundled Cygwin root, including `C:\\OGP64\\bin\\bash.exe`, then falls back to `C:\\cygwin64\\bin\\bash.exe` and `C:\\cygwin\\bin\\bash.exe`. Manual failures pause by default; set `GSP_AGENT_NO_PAUSE=1` for service wrappers that should not block.
|
||
|
||
`C:\\OGP\\Cfg\\bash_prefs.cfg` controls optional restart-time agent updates:
|
||
|
||
```bash
|
||
agent_auto_update=0
|
||
agent_update_repo_url=http://forge.runlevelsystems.com/dev/GSP.git
|
||
agent_update_branch=Panel-unstable
|
||
agent_update_raw_url=http://forge.runlevelsystems.com/dev/GSP/raw/branch/Panel-unstable/Agent-Windows/OGP64/OGP/ogp_agent.pl
|
||
```
|
||
|
||
When `agent_auto_update=1`, the launcher downloads to a temporary file, rejects HTML/404/empty/non-Perl content, validates with `perl -c`, backs up the current `ogp_agent.pl`, and rolls back if validation fails. This restart-time updater may replace only `/OGP/ogp_agent.pl`; it must not touch `Cfg/` files or other installer-generated state.
|
||
|
||
## Related repositories
|
||
|
||
- [GSP](https://github.com/GameServerPanel/GSP) – PHP panel that issues commands to the agents.
|
||
- [GSP-Agent-Linux](https://github.com/GameServerPanel/GSP-Agent-Linux) – Linux counterpart with systemd service files.
|
||
|
||
## Contributing
|
||
|
||
Send pull requests through GitHub. Test installer changes on a clean Windows Server VM, keep batch files in ASCII, and update `documentation/agent-guide.md` whenever you modify the workflow.
|