New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include systemd-user service file #198
Conversation
contrib/librespot.user.service
Outdated
ExecStart=/usr/bin/librespot --name "%n@%H" | ||
|
||
[Install] | ||
tWantedBy=default.target |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you have a typo here? tWantedBy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops! Fixed!
Also, I believe you mean Also, my system (raspbian) doesn't allow --now .. I simply |
@@ -9,7 +9,7 @@ User=nobody | |||
Group=audio | |||
Restart=always | |||
RestartSec=10 | |||
ExecStart=/usr/bin/librespot -n "%p on %H" | |||
ExecStart=/bin/sh -c 'exec /usr/bin/librespot --name librespot@$(hostname -s)' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you really think it's necessary to spawn another shell here around for librespot? I understand the problem, and maybe I'm a little OCD here, but I think the source of the bug should be fixed, which is that librespost should probably encode the device name so it's safe for use in a DNS node.
I've tried to give the iOS Spotify app a device name with a point in it, and there it works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is mostly due to #200. I can wait for this to be merged until that issue has been resolved, if you'd rather not have this hack here.
I've tried with the iOS app too -- using a FQDN fails, and I tried things as basic as "te.st
", and that fails. (if it works for you, let's please discuss that at #200).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, the shell is actually needed because syntax like $(hostname -s)
isn't accepted here, so it's slightly kind of a hack for the above bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather fix #200 independently, and not include the workaround in here.
Also document both this and the pre-existing service file and how they should be used.
Yup, you're right, it's |
|
||
[Service] | ||
Restart=always | ||
RestartSec=12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
librespot.service
use 10 here.
I don't really care about the value, but it should be consistent
Add 5xx error panic
Include a systemd.services file to run as a user
Also document both this and the pre-existing service file and how they should be used.