Feat/auto restart update file#1128
Open
Enz0Z wants to merge 2 commits into
Open
Conversation
Contributor
|
claude code write auto restart update file PR make no mistakes pls ty |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an opt-in feature that lets txAdmin automatically schedule a server restart when an update file (default
.update) appears in the root of the Server Data folder — the same folder that usually containsserver.cfg.This makes CI/CD-based deployments a one-step operation: after the pipeline copies the new files into place, it just drops a single file, and txAdmin handles the player-warned, graceful restart so the new files are loaded.
Motivation
Servers deployed via CI/CD (GitHub Actions, GitLab CI, Jenkins, deploy scripts, etc.) need a reliable way to apply a new build. Restarting the process directly skips player warnings and graceful shutdown, and calling the API from a pipeline requires authentication and extra plumbing. This reduces the whole operation to writing one file to disk.
How it works
<ServerDataFolder>/<UpdateFileName>.+Nminutes via the existing scheduler.What's new
Config (
restarterscope):updateFileEnabledfalseupdateFileDelay2updateFileName.updateSettings UI: the FXServer tab is now split into two cards/islands (mirroring the existing Game tab layout): Settings (unchanged) and a new CI/CD card holding the options above.
Safeguards
Usage example
Testing
coreandpaneltype checks pass.npm run build) succeeds..updatefile, and observing the warned, scheduled restart with the file content as the restart message.