mirror of
https://github.com/librespot-org/librespot.git
synced 2024-11-08 16:45:43 +00: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
|
@ -90,5 +90,6 @@ section = "sound"
|
|||
priority = "optional"
|
||||
assets = [
|
||||
["target/release/librespot", "usr/bin/", "755"],
|
||||
["contrib/librespot.service", "lib/systemd/system/", "644"]
|
||||
["contrib/librespot.service", "lib/systemd/system/", "644"],
|
||||
["contrib/librespot.user.service", "lib/systemd/user/", "644"]
|
||||
]
|
||||
|
|
|
@ -89,6 +89,7 @@ The above command will create a receiver named ```Librespot```, with bitrate set
|
|||
A full list of runtime options are available [here](https://github.com/librespot-org/librespot/wiki/Options)
|
||||
|
||||
_Please Note: When using the cache feature, an authentication blob is stored for your account in the cache directory. For security purposes, we recommend that you set directory permissions on the cache directory to `700`._
|
||||
|
||||
## Contact
|
||||
Come and hang out on gitter if you need help or want to offer some.
|
||||
https://gitter.im/librespot-org/spotify-connect-resources
|
||||
|
|
|
@ -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…
Reference in a new issue