[16:21] <foo> If I have something in /etc/init - I forget, is that systemd ?
[16:26] <jelly> 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] <foo> 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] <jelly> foo: which ubuntu release is this
[16:33] <jelly> lsb_release -a
[16:34] <JanC> if it has been online for 5+ years, it's probably out of support...
[16:35] <foo> jelly: Ubuntu 14.04.5 LTS
[16:35] <foo> JanC: not yet, I've been keeping an eye on that
[16:35] <jelly> foo: that one used upstart.
[16:35] <foo> I mean, it's getting there, but... :)
[16:35] <JanC> well, not 5+ years then
[16:35] <foo> jelly: thank you
[16:35] <foo> JanC: I've still been upgrading over those 5 years. :)
[16:35] <jelly> dpkg -S /sbin/init
[16:35] <JanC> or you upgraded it
[16:36] <foo> JanC: give a foo some credit! ;)
[16:36] <foo> jelly: aha, thank you: upstart: /sbin/init
[16:36] <foo> so, if I was to do a fresh install of ubuntu lts today, that would not use upstart - right?
[16:36] <jelly> 16.04 was the first LTS that switched over to systemd
[16:37] <foo> 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] <JanC> upstart uses events to start/stop services based on what other services started/stopped
[16:39] <JanC> in addition to the manpages, http://upstart.ubuntu.com/cookbook/ is probably the best source for upstart knowledge
[16:40] <foo> 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] <foo> in the git-hook
[16:41]  * foo scratches head
[16:45] <JanC> "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] <foo> JanC: yup, that would certainty be helpful at this point in time. I assume that's in the cookbook, checking now
[16:53] <foo> 6.33.2   Start depends on another service
[16:53] <foo> start on started other-service
[16:53] <foo> 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] <JanC> it means the service will be started after the other-service has started
[16:57] <JanC> so more or less A)
[16:59] <foo> Aha, ok
[16:59] <foo> 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] <foo> Can't seem to find that, anyway
[17:00] <JanC> you'd define that in the configuration of other-service
[17:01] <JanC> or you can start it in pre-start script
[17:01] <foo> JanC: how would I define it in the other-service is what I don't seem to be able to find
[17:01] <foo> ah, pre-start
[17:02] <foo> JanC: specifically, I'm looking at python long-running processes
[17:02] <JanC> in the configuration of other-service, you put "start on starting service" (where "service" is the first service)
[17:03] <foo> ahh, so the child is told when to start, not a parent conf that says to start children
[17:03] <foo> JanC: thank you! that distinction makes sense, I think I'm following now
[17:04] <foo> 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] <foo> We basically have 1 piece of software that has 4 long running python processes associated with it (eg. services)
[17:04] <JanC> you might want to look at the other services on the system to see how they depend on each other
[17:07] <JanC> if the 4 processes have no clear dependency on each other it might work to have some sort of meta-service indeed
[17:07] <foo> 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] <foo> 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] <JanC> just don't have an exec statement in it
[17:26] <foo> oh, heh, easy enough
[17:26] <foo> I thought there was something, thank you Jan!
[17:31] <JanC> 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] <foo> 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