Restart apache if not running

#!/bin/bash
RESTART="/sbin/service httpd restart"
 
PGREP="/usr/bin/pgrep"
 
HTTPD="httpd"
 
$PGREP ${HTTPD}
 
if [ $? -ne 0 ] # if apache not running
then
 $RESTART
fi

Comments

Popular posts from this blog

Water Wonder Resort

Redirect apache request to another domain

Can't use proxy because no authentication schemes are fully configured.