Re: init script, installed but not activated
On Tue, Oct 06, 2015 at 05:16:55PM -0300, Antonio Terceiro wrote:
> On Tue, Oct 06, 2015 at 10:47:28PM +0300, Hleb Valoshka wrote:
> > Hi all.
> > I'm packaging web server for ruby called unicorn. The package installs
> > sysv init script, I want to make it installed but not activated
> > because unicorn itself is useless, user should configure it and
> > activate it with "update-rc.d unicorn enable". Or it may installed as
> > dependency for rainbows, so it's clear that it should not run.
> > So I need something like "dh_systemd_enable --no-enable", existing
> > options for dh_installinit like "--no-start" or
> > "--update-rcd-params=..." does not work such way, so we need to
> > introduce workarounds in postinstall script.
> > Any suggestions?
> for sysvinit you need to code that manually in the initscript. several
> packages have their initscripts source /etc/default/$package, and check
> for some variable that says whether the service should start on boot or
> look at varnish for an example.
That is an abomination. Please don't do that. Please don't propagate
that. Please don't promote that.
There is nothing more annoying than having an init script go "ah, I'm
not supposed to work", when you run it manually.
It is easy to love a country that is famous for chocolate and beer
-- Barack Obama, speaking in Brussels, Belgium, 2014-03-26