blob: 9adec9c797a65847bd3360c12102f2eec7322730 (
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
33
|
#!/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.1 2004/08/08 18:34:03 stuart 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
cd $THTTPD_DOCROOT
if [ $? -ne 0 ]; then
eend $? "ERROR: cannot change to docroot \"$THTTPD_DOCROOT\""
fi
start-stop-daemon --quiet --start --startas /usr/sbin/thttpd \
--pidfile /var/run/thttpd.pid -- ${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
}
|