This commit is contained in:
Frank Harris 2026-06-07 18:51:56 -05:00
parent 44f37dfaff
commit 8f5ad2984a
5 changed files with 106 additions and 73 deletions

View file

@ -34,11 +34,11 @@ Common installed layout:
- Cygwin root: `C:\OGP64`
- Bash: `C:\OGP64\bin\bash.exe`
- Agent root: `C:\OGP64\OGP`
- Maintained launcher: `C:\OGP64\OGP\Install\agent_start.bat`
- Convenience launcher: `C:\OGP64\agent_start.bat`
- Maintained launcher: `C:\OGP64\agent_start.bat`
- Stop launcher: `C:\OGP64\agent_stop.bat`
The launcher checks `%~dp0bin\bash.exe`, `%~dp0..\bin\bash.exe`, `%~dp0..\..\bin\bash.exe`, `C:\OGP64\bin\bash.exe`, `C:\cygwin64\bin\bash.exe`, and `C:\cygwin\bin\bash.exe`. Missing-bash errors should print every checked path and pause in manual use. Set `GSP_AGENT_NO_PAUSE=1` for service/non-interactive wrappers that should fail fast instead of waiting at a prompt.
The launcher checks `%~dp0bin\bash.exe`, `C:\OGP64\bin\bash.exe`, `C:\cygwin64\bin\bash.exe`, and `C:\cygwin\bin\bash.exe`. Missing-bash errors should print every checked path and pause in manual use.
Generated config files under `/OGP/Cfg` are production state. Installer/startup may create them from `.default` templates if missing, but update logic must preserve them. Restart-time auto-update may replace only `/OGP/ogp_agent.pl`; it must not overwrite `Cfg/Config.pm`, `Cfg/Preferences.pm`, `Cfg/bash_prefs.cfg`, service settings, passwords, server data, or logs.
When the Windows agent starts, the batch wrapper now writes the startup log to `C:\OGP64\var\log\gsp_agent_start.log` when that Cygwin root is detected, and the Cygwin helper tees live output to `/var/log/gsp_agent_start.log` inside the shell environment. Manual failures print the last 100 lines of that log before the console pauses, so the original error remains visible in the same window.
When the Windows agent starts, `C:\OGP64\agent_start.bat` should be launched from the Cygwin root itself. It verifies the `gameserver` account, normalizes text files, validates `OGP\ogp_agent.pl`, and then launches the agent in the same console window. It should not call an installer wrapper from the start script.