#!/bin/sh
#
# Startup script for the Apache Web Server
#
# chkconfig: 345 85 15
# description: Apache is a World Wide Web server.  It is used to serve \
#	       HTML, PHP and CGI files.
# processname: apache1
# pidfile: /var/run/apache1/apache1.pid
# config: /etc/apache1/conf/apache1.conf

# Source function library.
. /etc/rc.d/init.d/functions

# Source the /etc/sysconfig/apache1 file.
if [ -f /etc/sysconfig/apache1 ]; then
    . /etc/sysconfig/apache1
fi

# See how we were called.
case "$1" in
  start)
	gprintf "Starting apache1: "
	daemon apache1 ${OPTIONS}
	echo
	touch /var/lock/subsys/apache1
	;;
  stop)
	gprintf "Shutting down apache1: "
	killproc apache1
	echo
	rm -f /var/lock/subsys/apache1
	rm -f /var/run/apache1/apache1.pid
	;;
  status)
	status apache1
	;;
  restart|reload)
	$0 stop
	$0 start
	;;
  *)
	gprintf "Usage: %s {start|stop|restart|reload|status}\n" "$0"
	exit 1
esac

exit 0
