#!/bin/sh 
# httpd Start/stop The Apache server 
# 
# Usage /etc/rc.d/init.d/httpd start|stop 
# processname: httpd
# chkconfig: 345 85 15 
# description: IBM HTTP Server (Apache)
# pidfile: /var/run/httpd.pid
# config: /opt/IBM/IHS/conf/httpd.conf
. /etc/init.d/functions

case "$1" in 

start)
	echo -n "Starting IBM HTTP server: " 
	daemon /opt/IBM/IHS/bin/apachectl start 
	RETVAL=$?
        if [ $RETVAL = 0 ]; then
                echo_success
        else
                echo_failure
        fi
        echo
	touch /var/lock/subsys/httpd
;; 

stop) 
	echo -n "Stopping IBM HTTP server: " 
	/opt/IBM/IHS/bin/apachectl stop >/dev/null 2>&1 & 
        RETVAL=$?
        if [ $RETVAL = 0 ]; then
                echo_success
        else
		echo_failure
        fi
        echo
	rm -f /var/lock/subsys/httpd
;; 

status)
	status httpd
;;

*) 
	echo "Usage: httpd {start|stop|status}" 
	exit 1 
esac

