Sophie

Sophie

distrib > Mandriva > 9.2 > i586 > by-pkgid > 8447b8bea0d4c21f6da67b1d211a4775 > files > 1

thttpd-2.20c-2mdk.i586.rpm

#!/bin/bash
# Startup script for the thttpd wed server
#
# chkconfig: 345 85 15
# description: thttpd is a very fast web server.
# 
# processname: thttpd
# pidfile: /var/run/thttpd.pid
# config: /etc/thttpd.conf

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

# Source networking configuration.
. /etc/sysconfig/network

[ -x /usr/sbin/thttpd ] || exit 0

# See how we were called.
case "$1" in
  start)
	gprintf "Starting thttpd: "
	daemon thttpd -C /etc/thttpd.conf
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/thttpd
	;;
  stop)
	gprintf "Shutting down thttpd: "
	killproc thttpd
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/thttpd
	;;
  status)
	status thttpd
	RETVAL=$?
	;;
  restart|reload)
	$0 stop
	$0 start
	RETVAL=$?
	;;
  *)
	gprintf "Usage: thttpd {start|stop|status|restart|reload}\n"
	exit 1
esac

exit $RETVAL