#!/bin/sh
#
# Startup script for the Roxen Web Server
#
# chkconfig: 345 85 15
# description: Roxen is a World Wide Web server.  It is used to serve \
# HTML files and CGI.
#
#


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

# See how we were called.
case "$1" in
  start)
	echo -n "Starting Roxen Challenger: "
	cd /usr/roxen
	./start > /dev/null 2>&1
	echo roxen
	touch /var/lock/subsys/roxen
	ln -s /tmp/roxen_pid:0 /var/run/roxen.pid
	;;
  stop)
	echo -n "Shutting down Roxen Challenger: "
	for i in `cat /var/run/roxen.pid` ; do
		kill `cat /var/run/httpd.pid`
	done
	echo roxen
	rm -f /var/lock/subsys/roxen
	rm -f /var/run/roxen.pid
	;;
  status)
	status roxen
	;;
  restart)
	$0 stop
	$0 start
	;;
  *)
	echo "Usage: roxen.init {start|stop|restart|status}"
	exit 1
esac

exit 0

