[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#291148: [PROPOSAL] Add a 'status' option in init.d scripts



On Wed, 19 Jan 2005 02:00:18 +0100, Javier Fernández-Sanguino Peña
wrote:
> I would like a new option to be added to init.d scripts: 'status' 
> which basicly tells what status is the service currently in 
> (either running or dead).


This wish combines nicely with the wish that initscripts implement
the "try-restart" method.  See #243159.


> This option is quite handy when you want to determine the system status
> (instead of blindly trying 'restart' and see what happens). It is
> also useful also to determine if the start-stop-daemon call
> succeeded and left a running program. Currently most init.d scripts
> will happily start up services which are not correctly configured
> and admins will not notice that they didn't start up until they
> check the service itself (is it running? what do the logs say?).


"/etc/init.d/foo start" should exit with a nonzero status if foo failed
to start.  Unfortunately this status isn't conveyed to the user, as you
say.

-- 
Thomas Hood



Reply to: