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
Computers | Open Source | General Information