forked from owntone/owntone-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforked-daapd.service.in
34 lines (29 loc) · 1.13 KB
/
forked-daapd.service.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
[Unit]
Description=DAAP/DACP (iTunes), RSP and MPD server, supports AirPlay and Remote
Documentation=man:forked-daapd(8)
After=network.target sound.target remote-fs.target pulseaudio.service avahi-daemon.service
[Service]
ExecStart=@sbindir@/forked-daapd -f
# Constrain the upper limit of memory/swap that can be used; this prevents
# forked-daapd from consuming all system memory (in event of bug/malformed user
# curl/SMARTPL query etc) that would hang/freeze low resource and headless (ie
# RPi) machines
#
# systemd will kill the process in such an event but would be auto-restarted as
# per 'Restart' directive below
#
# Values derived from obersvations on rpi3 under load - limits are >50% above
# seen high watermarks
#
# https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html
MemoryMax=256M
MemorySwapMax=32M
# 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