#!/bin/sh
#
# thttpd.sh - startup script for thttpd on FreeBSD 3.x
#
# This goes in /usr/local/etc/rc.d and gets run at boot-time.

case $1 in
	start)
		echo "Starting thttpd..."
		/usr/bin/thttpd -C /etc/thttpd.conf
		;;
	stop)
		echo "Stopping thttpd..."
		kill `cat /var/run/thttpd.pid`
		;;
	restart)
		$0 stop
		sleep 2
		$0 start
		;;
	*)
		echo "Usage:  thttpd {start | stop | restart}"
		;;
esac
