27 lines
741 B
Django/Jinja
27 lines
741 B
Django/Jinja
# {{ ansible_managed }}
|
|
#
|
|
[Unit]
|
|
Description=DAAP/DACP (iTunes), RSP and MPD server, supports AirPlay and Remote
|
|
Documentation=man:owntone(8)
|
|
Requires=network.target local-fs.target avahi-daemon.socket
|
|
After=network-online.target sound.target remote-fs.target pulseaudio.service
|
|
|
|
[Service]
|
|
ExecStart=/usr/sbin/owntone -f
|
|
|
|
# https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html
|
|
MemoryMax=4G
|
|
MemorySwapMax=256M
|
|
|
|
# Restart, but set a limit so we don't restart indefinitely. Unfortunately,
|
|
# systemd also applies the start limits to manual restarts, so that's why the
|
|
# burst value allows for 10 restarts.
|
|
Restart=on-failure
|
|
RestartSec=5
|
|
StartLimitBurst=10
|
|
StartLimitInterval=600
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
|