mirror of
https://github.com/librespot-org/librespot.git
synced 2025-10-03 01:39:28 +02:00
Include a systemd.service file to run as a user (#800)
Include a systemd.service file to run as a user This new `systemd.service` file allows running and controlling the service as an unpriviledged user (generally, as part of a user session).
This commit is contained in:
parent
b0a94f901d
commit
51a697201b
4 changed files with 19 additions and 4 deletions
|
@ -1,5 +1,7 @@
|
|||
[Unit]
|
||||
Description=Librespot
|
||||
Description=Librespot (an open source Spotify client)
|
||||
Documentation=https://github.com/librespot-org/librespot
|
||||
Documentation=https://github.com/librespot-org/librespot/wiki/Options
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
|
@ -8,8 +10,7 @@ User=nobody
|
|||
Group=audio
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
ExecStart=/usr/bin/librespot -n "%p on %H"
|
||||
ExecStart=/usr/bin/librespot --name "%p@%H"
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
|
|
12
contrib/librespot.user.service
Normal file
12
contrib/librespot.user.service
Normal file
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=Librespot (an open source Spotify client)
|
||||
Documentation=https://github.com/librespot-org/librespot
|
||||
Documentation=https://github.com/librespot-org/librespot/wiki/Options
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
ExecStart=/usr/bin/librespot --name "%u@%H"
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
Loading…
Add table
Add a link
Reference in a new issue