Re: Status in init.d (was: Re: init script config files)
> On Sat, 08 Jul 2000, Ethan Benson wrote:
> > who the hell needs status anyway, when i used redhat i found it to be
> > the most worthless thing ever conceived, it never was very accurate.
> > the way to find out status is ps aux | grep foo period.
Unfortunately, your ps suggestion isn't entirely accurate either, any
LSB issues aside. If you're looking at foo.init (with, say, "less
foo.init"), for example, foo can appear in the ps output even if foo
isn't running. ps auxc | grep " foo *$" works a bit better. (I had
problems -- now fixed -- with postgresql incorrectly detecting whether
postmaster was running because it used something like your suggestion
for detecting status.) The trailing " *" may not be necessary, but it
takes care of possible variation in ps output; I don't know how
standardized things like trailing spaces in ps output are.