> I just added a couple of lines of shell script following the links command 
> after
the 'status' command line switch. It checks for the number of httpd processes,
and if there are none, it echoes "It's DEAD, Jim!".  Otherwise It echoes "It's 
ALIVE!!!".

Isn't that just going to give bad results, though?  For example, if you had 
issued apachectl stop, there would still be processes handling the graceful 
stop, but your script would say it's alive.


Rick Houser
Web Administration

> -----Original Message-----
> From: Jeff Cauhape [mailto:jpcauh...@nvdetr.org]
> Sent: Monday, May 15, 2017 16:22
> To: users@httpd.apache.org
> Subject: RE: [users@httpd] A curious thing - apachectl status in Apache 2.4.25
> 
> EXTERNAL EMAIL
> 
> 
> Eric,
> 
> Yes, I went from 2.4.6 bundled with Red Hat to a plain source code build.
> It didn't occur to me that it might be that simple. Thanks! :o
> 
> Mgmt has decided that they want the ability to easily have multiple versions
> of Apache on our servers and to be able to switch from one build to another
> by
> having symbolic links that are generic that point to the active directory.
> Somewhat
> like the way Java does.
> 
> I just added a couple of lines of shell script following the links command 
> after
> the 'status' command line switch. It checks for the number of httpd
> processes,
> and if there are none, it echoes "It's DEAD, Jim!".  Otherwise It echoes "It's
> ALIVE!!!".
> 
> That seems pretty clear.
> 
> Jeff
> 
> -----Original Message-----
> From: Eric Covener [mailto:cove...@gmail.com]
> Sent: Monday, May 15, 2017 10:24 AM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] A curious thing - apachectl status in Apache 2.4.25
> 
> On Mon, May 15, 2017 at 1:22 PM, Jeff Cauhape <jpcauh...@nvdetr.org>
> wrote:
> > In the Apache 2.4.6 shell script apachectl, a call to “apachectl status”
> >
> > invokes systemctl status  httpd.service. This gives you easy-to-read
> >
> > output regardless if the server is running or not.
> 
> Did you go from a vendor package to a source install? The former probably
> just customized apachectl.
> 
> 
> --
> Eric Covener
> cove...@gmail.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to