That grep would not work on Debian-style packages because they show apache2
as the executable but it might be the best way on other systems.

- Y

Sent from a device with a very small keyboard and hyperactive autocorrect.

On Feb 21, 2017 8:54 AM, "Tom Browder" <tom.brow...@gmail.com> wrote:

> I need to programatically determine whether httpd is running or not,
> whether I'm root or not. The only reliable way I have found is to use the
> system command 'ps -C httpd' and grep the results.
>
> Is there a better way?
>
> Thanks.
>
> Best regards,
>
> -Tom
>

Reply via email to