cleanup
This commit is contained in:
parent
a49371c3dd
commit
251af10faf
1190 changed files with 12636 additions and 12476 deletions
|
|
@ -19,8 +19,8 @@ Note: the repository currently uses `Agent_Linux` on disk, not `Agent-Linux`.
|
|||
|
||||
Relevant files:
|
||||
|
||||
- `Agent_Linux/ogp_agent.pl`
|
||||
- `Agent-Windows/ogp_agent.pl`
|
||||
- `Agent_Linux/gsp_agent.pl`
|
||||
- `Agent-Windows/gsp_agent.pl`
|
||||
- `Panel/includes/lib_remote.php`
|
||||
- `Panel/modules/gamemanager/mini_start.php`
|
||||
- `Panel/modules/gamemanager/home_handling_functions.php`
|
||||
|
|
@ -55,9 +55,9 @@ Both agents use `screen` as the shared runtime backend.
|
|||
|
||||
Linux:
|
||||
|
||||
- `create_screen_id(SCREEN_TYPE_HOME, $home_id)` creates names like `OGP_HOME_000000123`.
|
||||
- `create_screen_id(SCREEN_TYPE_HOME, $home_id)` creates names like `GSP_HOME_000000123`.
|
||||
- `create_screen_cmd(...)` returns a `screen -d -m -t ... -S ...` command.
|
||||
- `create_screen_cmd_loop(...)` creates a generated shell script named like `OGP_HOME_000000123_startup_scr.sh`, then runs that script inside `screen`.
|
||||
- `create_screen_cmd_loop(...)` creates a generated shell script named like `GSP_HOME_000000123_startup_scr.sh`, then runs that script inside `screen`.
|
||||
- The generated shell script loops/restarts the server when autorestart is enabled.
|
||||
- The script checks for `SERVER_STOPPED` before respawning.
|
||||
|
||||
|
|
@ -157,7 +157,7 @@ That flow is now present in the current agent files. Any companion system should
|
|||
|
||||
Current PID tracking exists but is inconsistent:
|
||||
|
||||
- The agents write their own `ogp_agent.pid`.
|
||||
- The agents write their own `gsp_agent.pid`.
|
||||
- FastDownload has `fd.pid`.
|
||||
- Scheduler has `scheduler.pid`.
|
||||
- Linux game server child PIDs are discovered from the screen PID with `pgrep -P`.
|
||||
|
|
@ -196,7 +196,7 @@ There is no dedicated companion stdout/stderr log path today.
|
|||
|
||||
The clearest current companion behavior is Windows-only.
|
||||
|
||||
In `Agent-Windows/ogp_agent.pl`, `create_screen_cmd_loop(...)` generates `_serverStart.bat`. That generated batch file contains:
|
||||
In `Agent-Windows/gsp_agent.pl`, `create_screen_cmd_loop(...)` generates `_serverStart.bat`. That generated batch file contains:
|
||||
|
||||
```bat
|
||||
if exist "_alsoRun.bat" call "_alsoRun.bat"
|
||||
|
|
@ -407,7 +407,7 @@ Payload should contain fully resolved, validated data:
|
|||
"key": "bec",
|
||||
"enabled": true,
|
||||
"delay_seconds": 30,
|
||||
"working_dir": "/home/ogp_agent/OGP_User_Files/123/BEC",
|
||||
"working_dir": "/home/gsp_agent/GSP_User_Files/123/BEC",
|
||||
"command": "Bec.exe",
|
||||
"args": ["-f", "Config.cfg"],
|
||||
"stdout_log": "bec.out.log",
|
||||
|
|
@ -427,12 +427,12 @@ Recommended approach:
|
|||
|
||||
- Use separate `screen` sessions per companion.
|
||||
- Session naming:
|
||||
- Game: `OGP_HOME_000000123`
|
||||
- Companion: `OGP_COMPANION_000000123_bec`
|
||||
- Game: `GSP_HOME_000000123`
|
||||
- Companion: `GSP_COMPANION_000000123_bec`
|
||||
- Write companion runtime state under an agent-controlled path outside the game FTP/file-manager root.
|
||||
- Start delayed companions through a small agent-owned delay wrapper:
|
||||
- Linux: `screen -d -m -S OGP_COMPANION_... bash -lc 'sleep 30; cd ...; exec ...'`
|
||||
- Windows/Cygwin: `screen -d -m -S OGP_COMPANION_... cmd /Q /C "timeout /t 30 ... && cd /d ... && ..."`
|
||||
- Linux: `screen -d -m -S GSP_COMPANION_... bash -lc 'sleep 30; cd ...; exec ...'`
|
||||
- Windows/Cygwin: `screen -d -m -S GSP_COMPANION_... cmd /Q /C "timeout /t 30 ... && cd /d ... && ..."`
|
||||
|
||||
This avoids blocking game startup. The Panel can show the game as `STARTING`/`ONLINE` independently while companion statuses move through `PENDING`, `STARTING`, `RUNNING`, or `FAILED`.
|
||||
|
||||
|
|
@ -693,7 +693,7 @@ Linux can use:
|
|||
Recommended Linux companion launch:
|
||||
|
||||
```text
|
||||
screen -d -m -S OGP_COMPANION_<home_id>_<key> bash -lc '<agent-owned wrapper>'
|
||||
screen -d -m -S GSP_COMPANION_<home_id>_<key> bash -lc '<agent-owned wrapper>'
|
||||
```
|
||||
|
||||
Use an agent-owned wrapper or direct fork/exec to record PID and redirect logs.
|
||||
|
|
@ -714,7 +714,7 @@ Current `_alsoRun.bat` depends on WMIC in some XML. WMIC is not reliable on all
|
|||
Recommended Windows companion launch:
|
||||
|
||||
```text
|
||||
screen -d -m -S OGP_COMPANION_<home_id>_<key> cmd /Q /C "<agent-owned wrapper.bat>"
|
||||
screen -d -m -S GSP_COMPANION_<home_id>_<key> cmd /Q /C "<agent-owned wrapper.bat>"
|
||||
```
|
||||
|
||||
The wrapper should record the Windows PID or enough process/session information for cleanup.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue