From 1b430cb695dd541f80223d743f378135064f4fec Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 13 Jul 2026 16:44:51 +0200 Subject: init --- librespot@.service | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 librespot@.service (limited to 'librespot@.service') diff --git a/librespot@.service b/librespot@.service new file mode 100644 index 0000000..567a782 --- /dev/null +++ b/librespot@.service @@ -0,0 +1,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 + -- cgit v1.2.3