[Feature]: Grace period for stoponlyifnoplayers before forcing stop, restart or update

未关闭
#5,138 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@dgibbs64 已经在做这个了。

开始于 2026年11月1日。

评估

这个 Issue 还没有评估数据。

描述

command: monitor command: restart command: stop command: update priority: medium scope: all servers type: feature
Priority

priority: medium

User story

As a server admin using stoponlyifnoplayers, I want a blocked stop, restart or update to be forced after a set time so that busy servers still get their scheduled restarts and updates.

Game

No response

Linux distro

No response

Command

command: stop, command: restart, command: update, command: monitor

Problem statement

stoponlyifnoplayers="on" (added in v26.2.0, #4595) protects players by refusing to stop the server while anyone is online:

  • stop is refused.
  • restart is postponed, and monitor restarts the server once it is empty.
  • update will not stop the server when stoponlyifnoplayersallcommands="on", so it waits for the next run.

Nothing ever forces it. Many servers are never completely empty, because of AFK players or idlers, so on those servers a scheduled restart or update can be postponed forever. This was raised in #786 and agreed as a follow-up.

Scope and impact

scope: all servers

Further information

Add a grace period setting, for example stoponlyifnoplayersmaxdelay in minutes (default 0 = wait indefinitely, the current behaviour):

  1. When a stop, restart or update is blocked because players are online, record when it was first blocked.
  2. monitor and later runs keep checking. If the server empties, the command runs as it does today.
  3. Once the grace period has passed and players are still online, the command runs anyway and the forced stop is logged.
  4. The record is cleared once the command completes.

This pairs well with in-game warnings (#674): warn players during the grace period, then force the stop when it ends.

Alternatives considered

Turning stoponlyifnoplayers off for scheduled jobs. That loses the protection completely rather than limiting how long it can delay a restart.

主要语言
Shell
星标
4.9k
派生
870
平均合并
20 小时 11 分钟
30 天内合并 PR
135

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

GameServerManagers/LinuxGSM 的其他 Issue

查看 GameServerManagers/LinuxGSM 的全部 Issue

相似的 Issue

更多 Shell/Bash Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。