diff options
Diffstat (limited to 'www-servers/lighttpd/files/lighttpd-1.2.2.initd')
-rw-r--r-- | www-servers/lighttpd/files/lighttpd-1.2.2.initd | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/www-servers/lighttpd/files/lighttpd-1.2.2.initd b/www-servers/lighttpd/files/lighttpd-1.2.2.initd new file mode 100644 index 000000000000..5c74484b3176 --- /dev/null +++ b/www-servers/lighttpd/files/lighttpd-1.2.2.initd @@ -0,0 +1,32 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/files/lighttpd-1.2.2.initd,v 1.1 2004/08/08 17:28:06 stuart Exp $ + +LIGHTTPD_PID="/var/run/lighttpd.pid" +LIGHTTPD_BIN="/usr/sbin/lighttpd" +LIGHTTPD_CONF="/etc/lighttpd.conf" + +depend() { + need net + use mysql logger spawn-fcgi + after spawn-fcgi +} + +start() { + ebegin "Starting lighttpd" + ${LIGHTTPD_BIN} -f ${LIGHTTPD_CONF} + eend ${?} + pidof lighttpd >${LIGHTTPD_PID} +} + +stop() { + if [ -r ${LIGHTTPD_PID} ]; then + ebegin "Stopping lighttpd" + kill `cat ${LIGHTTPD_PID}` + eend $? + if [ -w ${LIGHTTPD_PID} ]; then rm ${LIGHTTPD_PID}; fi; + else + eerror "lighttpd: no PID-file found. no process killed!" + fi +} |