Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dependencies to the spotifyd systemd service
Spotifyd crashes if it starts before either the sound card is configured or the network is available. Whilst this is not too bad, it causes a restart of the service when started at boot. It is nicer to just depend on the targets that systemd provides to signal availability of both.
- Loading branch information
0c04c90
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.
@bertptrs Has this ever worked for you? As far as I can tell, those dependencies/ordering are not really valid for services of user contexts. I've been using
ExecStartPre=/usr/lib/systemd/systemd-networkd-wait-online
to actually avoid the restarting.0c04c90
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.
It does, but I do run it as a system service. Not as root, though.
0c04c90
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.
That explains it. Feel like this should be reverted because upstream ships it as user service.
0c04c90
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.
Disagree; this service is valid both as a user service and a system service.
Note: instead of your
ExecStartPre
trick, you should enablesystemd-networkd-wait-online.service
instead. This causesnetwork-online.target
to be reached only after an internet connection is actually established.0c04c90
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.
It is not shipped as a system service. If running it with system service is fine (even just in some case), then we can ship one with these deps/ordering additionally.
It has nothing to do with what I enables. The targets are entirely ignored/invalid for user-context services.