Harden systemd service, update restart policy (#888)

This commit is contained in:
Tom Vincent 2021-11-26 18:49:50 +00:00 committed by GitHub
parent 97399e2c0a
commit bbd575ed23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

View file

@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [main] Enforce reasonable ranges for option values (breaking).
- [main] Don't evaluate options that would otherwise have no effect.
- [playback] `alsa`: Improve `--device ?` functionality for the alsa backend.
- [contrib] Hardened security of the systemd service units
### Added
- [cache] Add `disable-credential-cache` flag (breaking).

View file

@ -2,12 +2,12 @@
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
Wants=network.target sound.target
After=network.target sound.target
[Service]
User=nobody
Group=audio
DynamicUser=yes
SupplementaryGroups=audio
Restart=always
RestartSec=10
ExecStart=/usr/bin/librespot --name "%p@%H"

View file

@ -2,6 +2,8 @@
Description=Librespot (an open source Spotify client)
Documentation=https://github.com/librespot-org/librespot
Documentation=https://github.com/librespot-org/librespot/wiki/Options
Wants=network.target sound.target
After=network.target sound.target
[Service]
Restart=always