ltm icon indicating copy to clipboard operation
ltm copied to clipboard

Optional systemd unit for always-on recording

Open Agent-Hellboy opened this issue 4 months ago • 1 comments

Summary

Ship an optional systemd unit so machines that want continuous capture can run ltm under the service manager, without replacing ad-hoc ltm start.

Today: ltm start re-execs daemon --foreground with Setsid + pidfile. That stays the default for demos / one-off sessions.

Proposal

  • Add something like deploy/ltm.service (or contrib/systemd/ltm.service) that runs:
    ExecStart=/usr/bin/ltm daemon --foreground --db … --pidfile …
    
  • Document install/enable in docs/cli.md / docs/recording.md (Linux only; recording already requires Linux).
  • Keep ltm start / ltm stop as the portable path; systemd is opt-in.
  • Do not require systemd or add a Go daemonization library.

Out of scope

  • launchd / macOS (recording is Linux-only)
  • Making systemd the only supported way to run the recorder

Acceptance

  • [ ] Unit file checked in with sane User/CapabilityBoundingSet notes (CAP_BPF / CAP_PERFMON or root)
  • [ ] Docs: enable/start/stop via systemctl vs ltm start
  • [ ] Confirmed daemon --foreground works as Type=simple ExecStart (already designed for this)

Agent-Hellboy avatar Jul 15 '26 12:07 Agent-Hellboy

Hi there! 👋

I've opened a PR to address this: #13

This adds an optional systemd unit for always-on recording, enabling continuous capture via the service manager. It includes the unit file with appropriate capability notes and updates the documentation, all while keeping ltm start as the default portable option.

Let me know what you think!

webbrain-one avatar Aug 03 '26 01:08 webbrain-one