Home arrow FreeBSD Tips arrow Write a Script to Check if Apache is Running
Write a Script to Check if Apache is Running PDF
Monday, 05 May 2008

Here is a small script to check if Apache Server is running. You can modify it to any service you need/want:

#!/bin/sh
netstat -ant | grep "*.80 " >/dev/null
APACHE_STATUS="$?"

if [ "$APACHE_STATUS" -eq 0 ]
then
        echo Apache is Up and running!
fi

 
< Prev   Next >

Other BSD Systems

OpenBSD

Misc

Solaris

Polls

Best BSD firewall?