- Run cantata-dynamic as user mpd, group audio (instead of root). This also requires that /run/cantata-dynamic is created by systemd as user mpd doesn't have the necessary right. - When cantata-dynamic is started, ensure that mpd is started before it.
17 lines
402 B
Plaintext
Executable File
17 lines
402 B
Plaintext
Executable File
[Unit]
|
|
Description=Cantata Dynamic Server
|
|
Wants=mpd.service
|
|
After=mpd.service
|
|
|
|
[Service]
|
|
User=mpd
|
|
Group=audio
|
|
Type=forking
|
|
ExecStart=/usr/share/cantata/scripts/cantata-dynamic server /etc/cantata-dynamic.conf
|
|
ExecStop=/usr/share/cantata/scripts/cantata-dynamic stopserver /etc/cantata-dynamic.conf
|
|
RuntimeDirectory=cantata-dynamic
|
|
PIDFile=/run/cantata-dynamic/pid
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|