Run the phone as a boot-start systemd service #10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/systemd-boot-service"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Until now the phone only ran in the foreground via
make run, so a rebooted (or crashed) Pi stayed silent until someone re-ran it by hand. This installs it as a systemd system service so it always comes back.Why a system service (not
systemd --user): the Pis run plain ALSA — no PulseAudio/PipeWire — so the daemon reaches the USB handset with no login/user session, and the existing LED udev rule already grants the deploy user sysfs write access. No root, no linger.Ordered
After/Wantswg-quick@wg0sincepeer_hostis the overlay IP —WantsnotRequires, because the app retries its peer connection and shouldn't fail to start over a briefly-absent tunnel.The unit is a template rendered per-Pi (user / workdir / uv path) by
scripts/pi_service.sh, mirroring the existingpi_install.sh/pi_config.shflow, and wired up asmake service PI=....Verified on both Pis: installed, enabled, then rebooted both — each came back automatically (
active/enabled,wg0up, peers reconnected over the overlay, LED SOLID).🤖 Generated with Claude Code