[16:21] If I have something in /etc/init - I forget, is that systemd ? [16:26] foo: /etc/init is for upstart, but if files merely exists that's not proof they're used and upstart is actually running [16:30] jelly: how can I be sure? This is a system that has been online for 5+ years. I believe upstart is older and systemd is newer? [16:32] foo: which ubuntu release is this [16:33] lsb_release -a [16:34] if it has been online for 5+ years, it's probably out of support... [16:35] jelly: Ubuntu 14.04.5 LTS [16:35] JanC: not yet, I've been keeping an eye on that [16:35] foo: that one used upstart. [16:35] I mean, it's getting there, but... :) [16:35] well, not 5+ years then [16:35] jelly: thank you [16:35] JanC: I've still been upgrading over those 5 years. :) [16:35] dpkg -S /sbin/init [16:35] or you upgraded it [16:36] JanC: give a foo some credit! ;) [16:36] jelly: aha, thank you: upstart: /sbin/init [16:36] so, if I was to do a fresh install of ubuntu lts today, that would not use upstart - right? [16:36] 16.04 was the first LTS that switched over to systemd [16:37] got it. I believe systemd can support deps, can upstart do that as well? eg. I have a handful of processes I either want to associate with 1 parent, or I want to have one of the children depend on the other children [16:39] upstart uses events to start/stop services based on what other services started/stopped [16:39] in addition to the manpages, http://upstart.ubuntu.com/cookbook/ is probably the best source for upstart knowledge [16:40] JanC: perfect, I'll take a look there - thanks. I wrote some python code to manually do "service ___ start/stop" ... but recently was advised to do this all in my git-hook and take it out of python. Makes sense. Actually, if I do it in a git-hook, I guess I don't need to make the services depend on a parent to make it easy, I'll simply add a new service there [16:41] in the git-hook [16:41] * foo scratches head [16:45] "service" has the advantage of working with (almost) every init system, but you probably want to restart only one service, and have all dependent service restarted automatically too [16:50] JanC: yup, that would certainty be helpful at this point in time. I assume that's in the cookbook, checking now [16:53] 6.33.2 Start depends on another service [16:53] start on started other-service [16:53] Does that mean: A) the service won't start if the other one isn't running or B) the service will start and it'll automatically start the other-service ? [16:57] it means the service will be started after the other-service has started [16:57] so more or less A) [16:59] Aha, ok [16:59] I don't think there is a way, with upstart at least, to say "if this service starts, start this other service too if it's not running" - correct? [17:00] Can't seem to find that, anyway [17:00] you'd define that in the configuration of other-service [17:01] or you can start it in pre-start script [17:01] JanC: how would I define it in the other-service is what I don't seem to be able to find [17:01] ah, pre-start [17:02] JanC: specifically, I'm looking at python long-running processes [17:02] in the configuration of other-service, you put "start on starting service" (where "service" is the first service) [17:03] ahh, so the child is told when to start, not a parent conf that says to start children [17:03] JanC: thank you! that distinction makes sense, I think I'm following now [17:04] JanC: now, I wonder if it makes sense to have A) dummy parent, that doesn't really do much, but several children start when parent starts or B) just pick a child and make other children start when it starts. Is there a best practice/preference here? [17:04] We basically have 1 piece of software that has 4 long running python processes associated with it (eg. services) [17:04] you might want to look at the other services on the system to see how they depend on each other [17:07] if the 4 processes have no clear dependency on each other it might work to have some sort of meta-service indeed [17:07] JanC: yeah, they don't have a clear dependency, which is why I'm leaning towards that... but I'm wondering, is there shorthand for making a meta-service? [17:07] eg. I can create a bash script that does nothing but sleep every second... but I'm wondering if there is something less hack-ish [17:22] just don't have an exec statement in it [17:26] oh, heh, easy enough [17:26] I thought there was something, thank you Jan! [17:31] you would have "start on starting meta-service" and "stop on stopping meta-service" in each of the "subservices", or something like that [17:35] JanC: yup, that would do the trick. When I upgrade to the latest ubuntu early next year, I suspect I'll have to change this for systemd