-
Notifications
You must be signed in to change notification settings - Fork 685
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
Running Mopidy as a daemon in Debian #590
Conversation
Cool! I'll give this a look later :-) |
Great idea splitting out the daemon config from the main server like this :-) |
Well, thanks ;-) The idea was to keep the whole daemon-thing self-contained, and keep the standard mopidy package as-is. A lot of people seem to have invested quite some effort to get mopidy running as a daemon locally, so they might not want to install the daemon package, since that would clash with their "homegrown" installation. One area that needs some clarification, though, is the use of /etc/mopidy/mopidy.conf My version of mopidy does not seem to use it when running locally, but mopidy-scan does, according to debug output. It would also be great if mopidy-scan had a --config option, so I could use that when running it from the init script on "force-reload". |
mopidy-scan is being moved to a sub-command of mopidy, this means that the behavior is unified with respect to --config |
Hmm, this idea is probably something that doesn't need to fit into this initial PR, but we probably want a |
Having a separate directory for extensions is definitely a good idea; the way this is generally done is having a setting in your master config file, e.g. config_dir = /etc/mopidy/extensions.d or config_files = /etc/mopidy/extensions.d/*.conf so the files will usually be included after parsing your master config. So this could be implemented later without any change to --config behavior. |
Sorry, make this include_dir or include_files for clearer semantics. |
I'll have to think a bit about how I want to solve this, was happy with just having gotten rid of loading the config in two phases. But not really a huge deal if we re-add it. Alternative I'm considering is a flag for the same thing, and have it default to But I digress again, this is useful to figure out, but not relevant mergin for this PR. Hopefully @jodal will have some time soon to look at the packaging changes :-) |
@@ -0,0 +1,22 @@ | |||
[loggers] | |||
keys=root |
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.
Please do s/=/ = /g
for increased readability here as it's an ini file, not a shell script.
I think this looks really good! I will want to include this in the That said, please continue to keep the packages separated for now, and I'll merge them later, but name variables etc with the |
@@ -0,0 +1,6 @@ | |||
#!/bin/sh |
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 file can be completely dropped since it only contains the debhelper token.
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 thought this was necessary for a prerm script with a proper stop command to be generated, but this seems to be handled by dh_installinit anyway. Thanks for the hint.
@gitkemmer For some much needed context, @tfheen is the Debian Developer that will sponsor the Mopidy packages into Debian. Consider his words my words :-) |
Yeah, I know: Always be nice to your Debian sponsor ;-) |
@jodal, so it doesn't get lost in the commit comments: @tfheen suggested removing the The Can we agree on this? We'd have to clarify the default options (currently |
I'm all good with removing the I think having |
With proper init systems (cough systemd cough), logging to stdout is fine, but you can have that difference if you start shipping a .service file. :-) |
Hi all, |
@tfheen: for now, the "mopidy-daemon" package is kept separate, as is the init script; @jodal will merge this into the regular "mopidy" package at his convenience. This will also include renaming "mopidy-daemon.init" to "mopidy.init", I guess. The "- documentation" was an oversight, of course. Thanks for reporting! |
Renaming init scripts is a pain, I'd recommend changing the init script name straight away even if you keep the init script in its own package. |
I've merged (and squashed) this into the debian branch now, tested a bit, and done some tweaks. Next up, Mopidy needs support combining multiple config files, so that the extension packages can install their own config fragments and use e.g. |
Hi y'all,
I forked the "debian" branch and added a small Debian package for running Mopidy as a system daemon.
The additional package is named "mopidy-daemon", depends on the "mopidy" package (so I could use the current version from the repo), and provides:
I'd greatly appreciate if you gave this a look, and let me know what you think of it. I've tested on Ubuntu 13.10 and Raspbian. My primary goal for this was to replace MPD on my Raspberry Pi "kitchen radio"; looks good, so far ;-)
Kind Regards,
Thomas