Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE]: Stop server between specified hours #877

Closed
Wafelowski opened this issue Oct 15, 2023 · 5 comments
Closed

[FEATURE]: Stop server between specified hours #877

Wafelowski opened this issue Oct 15, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@Wafelowski
Copy link

Scope

Web

Feature Description

Since we've got an auto-restart feature, a start-stop system for specified hours wouldn't be a bad thing to introduce. My current workaround would be to use a cron to kill the Tmux and start it again after some time, but that's not the point. I know it won't be a feature for everyone, but many servers are empty during the night or chaos happens. Why should the resources be reserved if they are not being used.

Use Case

No response

Proposed Solution

Introduce a "Start-Stop" feature, that allows the user to specify time ranges where the server will be off/on.

Additional Info

No response

@Wafelowski Wafelowski added the enhancement New feature or request label Oct 15, 2023
@tabarra
Copy link
Owner

tabarra commented Oct 15, 2023

Thanks for the suggestion.
Although I see it as a valid feature, unfortunately I would have to mess with the current scheduler, which is not something I'm looking forward to, so probably wont do it unless enough people ask for it.
But for now i'll keep this thread open to potentially gather more feedback on this use case.

Thanks.

@tabarra
Copy link
Owner

tabarra commented May 7, 2024

Due to the complexity of this task and lack of demand, I've decided that the best approach would be to allow scripts to change the server whitelist mode to Admin Only through the API, which would solve this need without all the added complexity.
Therefore, I refer anyone that wants this to #442.

@tabarra tabarra closed this as not planned Won't fix, can't repro, duplicate, stale May 7, 2024
@Tfc538
Copy link

Tfc538 commented May 21, 2024

While it may not be widely requested, I believe there’s a strong case for its necessity.

Our goal is to automate server updates, which would significantly streamline our workflow. The plan is to have a test server updated daily and the main server on a weekly basis, each tied to their respective Git branches.

A REST API would facilitate this process, allowing server management through endpoints like https://{server_ip}:{port}/api/v1/shutdownServer, with secure authentication via Bearer Token or User + Password. The challenge lies in ensuring TxAdmin remains operational during updates, which it isn’t if we need to shutdown FxServer in order to do this.

Also we can’t update while FxServer is running as this led to data corruption in earlier attempts.

@tabarra
Copy link
Owner

tabarra commented Jul 5, 2024

@Tfc538 If your necessity is to do automatic updates, then the requested featured (scheduled stop/starts) are definitely not the adequate solution, but instead it would be some dynamic update thing in txAdmin itself.

@Tfc538
Copy link

Tfc538 commented Jul 5, 2024

Hey @tabarra, I meant resource updates, not FXServer updates.

Our LUA and DevOps engineers have outlined the following process:

  1. Regularly (about once a day), check the production repository for changes.
  2. If updates are found, cache them in a temporary folder and schedule a server stop in X minutes.
  3. Announce the upcoming server stop to players at 120, 90, 30, 10, 5, 4, 3, 2, and 1 minute before stop
  4. When the server stops, create a backup of the database and resources.
  5. After the backup, delete the current resources folder and copy the new resources from the cache. Perform database migrations if necessary.
  6. Restart the server once all updates and backups are complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants