| Age | Commit message (Collapse) | Author |
|
Sequence items arrive as SCALAR events with in_value==0 (no preceding
key), so they were being treated as keys and silently discarded.
Handle SECTION_LOGS scalars directly as list items when in_value is
unset, leaving the normal key/value path for all other sections.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
inotify watches the symlink inode itself, not the target, so IN_MODIFY
never fires when the target file is written. Use realpath() to resolve
the configured path before open() and inotify_add_watch(), allowing
a stable symlink (e.g. current.log) in the unit YAML that gets
re-resolved to the actual log file on each init/SIGHUP.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
- Detect IN_MOVE_SELF/IN_DELETE_SELF events in log_tail_handle and
re-open the watched path so srcds log rotation is followed correctly
- Parse inotify events rather than blindly draining them
- Call log_tail_cleanup() before log_tail_init() on SIGHUP to prevent
fd leaks on reload
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
State probing overhaul, A2S queries, tail/broadcast, bot audit log
|
|
State detection:
- Add STATE_STOPPING to ProcessState enum
- Replace system("systemctl is-active") with libsystemd sd-bus API for
accurate starting/stopping/crashed state reporting; works for any unit
type (RCON or STDIN) that declares a service: field
- Implement real A2S_INFO UDP queries (src/console/a2s.c) for units
with health.type = a2s (Valve games: TF2, GMod); differentiates
running / hibernating (0 players) / changing_map (A2S down, RCON up)
/ unreachable; includes player count and map name in responses
- Refactor probe_rcon_state() into probe_unit_state() returning a
ProbeResult struct with state, players, max_players, map fields
- status and list responses now include players/max_players/map fields
New daemon commands:
- tail <unit>: return ring buffer snapshot as a single response
- broadcast <message>: send broadcast_cmd-formatted message to all
running units; works for both RCON and STDIN console types
New YAML field:
- broadcast_cmd: command template (e.g. "say {msg}") — opt-in per
unit; units without it are skipped by broadcast
CLI (umbrella-cli):
- Add tail subcommand (non-interactive output snapshot)
- Add broadcast subcommand
- status shows Players and Map when available
- list adds PLAYERS and MAP columns
Bot (umbrella-bot):
- Replace !attach / !detach with !tail (shows last 30 lines, no streaming)
- Add !broadcast command
- Write per-!cmd audit entries to /var/log/umbrella/bot-audit.log
- !units and !status responses include player counts when available
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Previously, `umbrella-cli list` reported each unit's cached internal
state, while `umbrella-cli status <unit>` used probe_rcon_state() to
actively verify RCON units via systemd and a live network probe. This
caused the list to show stale or inconsistent state compared to status.
Move probe_rcon_state() before cmd_list() and use it there so both
commands share the same state determination logic.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Add Claude Code GitHub Workflow
|
|
|
|
|
|
|
|
|