[Catalyst] upstart script for Starman-based app?
orasnita at gmail.com
Mon May 7 05:36:34 GMT 2012
From: "Dave Rolsky" <autarch at urth.org>
Subject: Re: [Catalyst] upstart script for Starman-based app?
> On Fri, 4 May 2012, Octavian Rasnita wrote:
>>>> expect fork
>>> I'm not sure why you need this. There's no fork happening with your config,
>> But isn't Starman doing a fork?
> Yes, but the "expect fork" is telling upstart to expect the process to
> fork once and create a single child, letting the parene exit. Upstart will
> track the pid of the child and kill that when you stop the process.
> With Starman, the parent stays active, and it's what should be killed when
> you want to stop the process.
I see that this is not happening, at least if starman receives the --user and --group parameters.
I have use --user teddy --group teddy in the upstart config, and even though I execute "start prg" and "stop prg" from the root account, all the starman processes are owned by teddy account. And there are 11 processes, even though I asked starman to run 10 children, so the master process is also owned by teddy account.
>>> To be honest, I kind of hate upstart. It's really freaking inscrutable and
>>> the docs suck. I've gotten some info out of it by putting it into debug
>>> mode and watching /var/log/daemon.log
>>> I really wish Ubuntu would just kill upstart and switch to systemd.
>> I have never used nor seen a systemd script although I heard about it.
>> I was able to compare just the huge and complicated systemv init scripts and
>> upstart, and upstart is better (if it works:)
>> Isn't OK to install systemd using apt-get?
>> I've found that there is a systemd package available for Ubuntu:
>> p live-config-systemd - Debian Live -
>> System Configuration Scripts (systemd backend)
> That won't magically make all the other packages use systemd instead of
> upstart, and I don't think trying to run two init daemons is a great idea
I've seen that not all the processes started automaticly use upstart under Ubuntu.
For example, I can manage apache2 process using
service apache2 status
because apache2 uses a SystemV script.
I read somewhere that upstart can work somehow with upstart scripts, but that the old SysV init scripts are also executed... but I don't know if it can also work in the same way with SysD scripts...
More information about the Catalyst