add basic systemd service unit example

put to /etc/systemd/system/librespot.service and then do `systemctl daemon-reload`
This commit is contained in:
herrernst 2016-12-21 23:21:40 +01:00
parent 880a266625
commit b9eb4de090
2 changed files with 16 additions and 1 deletions

View file

@ -92,5 +92,6 @@ available in the official library."""
section = "sound"
priority = "optional"
assets = [
["target/release/librespot", "usr/bin/", "755"]
["target/release/librespot", "usr/bin/", "755"],
["assets/librespot.service", "lib/systemd/system/", "644"]
]

14
assets/librespot.service Normal file
View file

@ -0,0 +1,14 @@
[Unit]
Description=Librespot
Requires=network-online.target
After=network-online.target
[Service]
#User=librespot
Restart=always
RestartSec=10
ExecStart=/usr/bin/librespot -n "%p on %H"
[Install]
WantedBy=multi-user.target