blob: 567a782aa3c62786bfb3d5755e1622f657a764b2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
[Unit]
Description=Librespot instance for %I
After=network.target
[Service]
Type=simple
# Create the pipe and cache folders automatically
ExecStartPre=/usr/bin/mkdir -p /opt/spotify-bot/pipes
ExecStartPre=/usr/bin/mkdir -p /var/cache/librespot/%I
ExecStartPre=/usr/bin/rm -f /opt/spotify-bot/pipes/%I_pipe
ExecStartPre=/usr/bin/mkfifo /opt/spotify-bot/pipes/%I_pipe
# Launch Librespot using OAuth and saving credentials to a local cache folder
ExecStart=/usr/bin/librespot -n "Server Speaker (%I)" --backend pipe --device /opt/spotify-bot/pipes/%I_pipe --cache /var/cache/librespot/%I --enable-oauth
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
|