* add no stop if players online
* remove dev message
* monitor will now restart the server if requested earlier
* changed var name
* add npm check to install gamedig
* new line
* add var
* remove from non supported servers
* typo
* word
* move restart request
* change lock file name
* restart and monitor
* refactor(stop): share player-online check + add stoponlyifnoplayersallcommands
- Extract the duplicated gamedig player-count query (previously copy-pasted
in command_stop, command_restart and command_monitor) into a new shared
check_players_online.sh module that sets ${playersonline}; registered in
core_modules.sh.
- Add stoponlyifnoplayersallcommands (default on) so the stoponlyifnoplayers
protection applies to every command that stops the server (e.g. update).
Set to off to limit it to explicit stop/restart, allowing update to stop
the server even while players are online.
- Add the new setting to all game server _default.cfg files.
- Resolve merge with develop (check_gamedig now keeps develop's npm-update
branch plus the 'install Node.js' hint).
* fix(stop): clear stale restart-request lock + warn on failed player query
Addresses Copilot review feedback on #4595:
- command_restart.sh: clear the *-restart-request.lock once a restart
actually proceeds. Previously the lock was only written when postponing
and never removed, so every subsequent monitor run would see the stale
lock and trigger a repeat restart indefinitely. Fixed and verified against
a live server: postponed restart -> monitor executes it and clears the
lock -> a second monitor run no longer restarts.
- check_players_online.sh: if the gamedig query fails for every configured
IP (e.g. gamedig/jq missing), playersonline now still fails open (so a
broken query can't permanently block stop/restart) but prints a clear
warning that the safety check could not run, instead of silently
behaving as if the server were empty.
* feat(alerts): add Matrix alert provider
* fix(alerts): use PUT instead of POST for Matrix send-event endpoint
The Matrix Client-Server API requires PUT for
/_matrix/client/v3/rooms/{roomId}/send/{eventType}/{txnId}; sending
POST would be rejected by any spec-compliant homeserver (405), so
alerts would never actually send. Also documents that matrixroom
must be the internal room ID, not the human-readable room alias.
* fix: restore executable bit on alert_matrix.sh
* fix(alerts): register alert_matrix module and harden dispatch
Addresses review feedback on the Matrix alert provider:
- Register alert_matrix.sh in core_modules.sh so the module actually
resolves when alert.sh calls it (without this the call fails as an
unknown command and no alert is ever sent).
- Use curl -sSL to follow redirects, matching the other alert modules
(some homeservers/reverse proxies redirect the client API).
- Require matrixhomeserver to be set in the dispatch condition,
consistent with the TEST-ALERT checks, to avoid building a broken
URL when it is empty.