Files
Stefan AgnerandClaude Opus 5 60d79134ea Do not start Supervisor from HA CLI and serial getty units (#4918)
The HA CLI unit (and the serial getty drop-in) pulled in
haos-supervisor.service via Wants=. Since #4326 the CLI unit is
configured to never reach its start limit (RestartSec=100ms,
RestartMaxDelaySec=3s, StartLimitIntervalSec=3s), so it restarts
indefinitely - and every restart starts the Supervisor again.

This makes it impossible to stop the Supervisor for debugging: stopping
haos-supervisor.service and removing the containers terminates
hassio_cli, which makes ha-cli@tty1.service exit and restart, which
immediately starts the Supervisor back up.

The Wants= is not needed: haos-supervisor.service is
WantedBy=multi-user.target and gets started on boot regardless. Drop it
and keep only the After= ordering.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-27 14:46:55 +02:00

44 lines
1.2 KiB
Desktop File

[Unit]
Description=Home Assistant CLI
After=systemd-user-sessions.service plymouth-quit-wait.service getty-pre.target haos-supervisor.service
Conflicts=getty@%i.service
# If additional gettys are spawned during boot then we should make
# sure that this is synchronized before getty.target, even though
# getty.target didn't actually pull it in.
Before=getty.target
# IgnoreOnIsolate causes issues with sulogin, if someone isolates
# rescue.target or starts rescue.service from multi-user.target or
# graphical.target.
Conflicts=rescue.service
Before=rescue.service
# Same value as RestartMaxDelaySec to avoid marking the service as failed
StartLimitIntervalSec=3s
[Service]
# the VT is cleared by TTYVTDisallocate
# The '-o' option value tells agetty to replace 'login' arguments with an
# option to preserve environment (-p), followed by '--' for safety, and then
# the entered username.
ExecStart=/usr/sbin/haos-cli
Type=idle
Restart=always
RestartSec=100ms
RestartMaxDelaySec=3s
RestartSteps=3
UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
IgnoreSIGPIPE=no
SendSIGHUP=yes
StandardInput=tty-force
StandardOutput=inherit
StandardError=inherit
[Install]
WantedBy=multi-user.target