#!/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 files and CGI.
# processname: httpsd
# pidfile: /var/run/httpd.pid
# config: /etc/httpd/conf/access.conf
# config: /etc/httpd/conf/httpd.conf
# config: /etc/httpd/conf/srm.conf


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

# See how we were called.
case "$1" in
  start)
	echo -n "Starting httpsd: "
	daemon httpsd -DSSL
	echo
	touch /var/lock/subsys/httpsd
	;;
  stop)
	echo -n "Shutting down httspd: "
	[ -f /var/run/httpsd.pid ] && {
	    kill `cat /var/run/httpsd.pid`
	    echo -n httpsd
	}
	echo
	rm -f /var/lock/subsys/httpsd
	rm -f /var/run/httpsd.pid
	;;
  status)
	status httpsd
	;;
  restart)
	$0 stop
	$0 start
	;;
  reload)
	echo -n "Reloading httpsd: "
	[ -f /var/run/httpsd.pid ] && {
	    kill -HUP `cat /var/run/httpsd.pid`
	    echo -n httpsd
	}
	echo
	;;
  *)
	echo "Usage: $0 {start|stop|restart|reload|status}"
	exit 1
esac

exit 0
