From 9d3c7500ee39e1e4c757176b5a41ce918072e093 Mon Sep 17 00:00:00 2001 From: "Somhairle H. Marisol" Date: Tue, 29 Sep 2026 11:00:01 +0800 Subject: fix(service): correct systemd module entrypoint [Problem] - The installed user service fails before recording starts. [Root Cause] - The unit invokes the package without its CLI module and places StartLimit directives in [Service]. [Solution] - Invoke mic_clipper.cli and move StartLimit directives to [Unit]. - Cover both rendered-unit requirements with the service test. [Impact] - The service template and its regression test are updated. --- src/mic_clipper/service.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mic_clipper/service.py b/src/mic_clipper/service.py index ecf5673..2b10710 100644 --- a/src/mic_clipper/service.py +++ b/src/mic_clipper/service.py @@ -17,18 +17,18 @@ def render_unit(python: Path, project_root: Path) -> str: Description=Offline voice-activated microphone clip recorder Wants=pipewire.service wireplumber.service pipewire-pulse.service After=pipewire.service wireplumber.service pipewire-pulse.service +StartLimitIntervalSec=300 +StartLimitBurst=10 [Service] Type=simple WorkingDirectory={project_root} Environment=PYTHONPATH={project_root / 'src'} -ExecStart={python} -m mic_clipper run +ExecStart={python} -m mic_clipper.cli run Restart=on-failure RestartSec=5s RestartSteps=5 RestartMaxDelaySec=60s -StartLimitIntervalSec=300 -StartLimitBurst=10 NoNewPrivileges=yes PrivateTmp=yes UMask=0077 -- cgit v1.2.3