Files
shairport-sync/scripts/shairport-sync.service.in
Mike Brady 83ae1d286b Add a new exit handler to enable Shairport Sync to exit cleanly — that is, on exit, to clean up everything, e.g. open files, ports, sockets, devices, threads, it has been using.
If cleanup isn’t finished after one second, exit will occur unconditionally.
Use the new exit handler for normal exit, for SIGINT and SIGTERM handling, for abnormal exit after fatal errors, and for handling quit requests from the D-Bus and MPRIS interfaces.

When an unfixable error occurs without an installed unfixable error handler, unlock the mutex protecting Shairport Sync’s alsa backend to permit a clean exit.

Fix a very low-level mutex-locking error that interfered with debugging.

Simplify much mutex lock handling.
Remove lots of old and unused code, variables and definitions.

Update audio_sndio.c to remove some harmless compiler warnings.

Undo adding two seconds for messages to be output before _Exit() on die() to allow messages to be output...
Undo making die() exit unconditionally.
2026-07-16 14:51:06 +01:00

22 lines
434 B
Plaintext

[Unit]
Description=Shairport Sync - AirPlay Audio Receiver
After=sound.target
Wants=network-online.target
After=network.target network-online.target
@SYSTEMD_AFTER_ARGS@
@SYSTEMD_WANTS_ARGS@
@SYSTEMD_REQUIRES_ARGS@
StartLimitIntervalSec=300
StartLimitBurst=5
[Service]
ExecStart=@prefix@/bin/shairport-sync
User=shairport-sync
Group=shairport-sync
LimitRTPRIO=5
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target