blob: 5c74484b31768d950318569c7e1c619a506d2b66 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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
}
|