#!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License, v2 or later # $Header: /var/cvsroot/gentoo-x86/www-servers/thttpd/files/thttpd-2.25/thttpd.init,v 1.2 2006/09/06 14:31:17 dsd Exp $ depend() { need net } start() { ebegin "Starting thttpd" if [ ! -d "$THTTPD_DOCROOT" ]; then eend 1 "THTTPD_DOCROOT not set correctly in /etc/conf.d/thttpd" exit 1 fi start-stop-daemon --quiet --start --startas /usr/sbin/thttpd \ --pidfile /var/run/thttpd.pid --chdir "$THTTPD_DOCROOT" -- \ ${THTTPD_OPTS} eend $? } stop() { local rc ebegin "Stopping thttpd" start-stop-daemon --quiet --stop --pidfile /var/run/thttpd.pid rc=$? rm -f /var/run/thttpd.pid eend $rc }