blob: f32c883d024e54b7f2d88d69668cfedc9e869295 (
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
# $Header: /var/cvsroot/gentoo-x86/www-servers/mini_httpd/files/mini_httpd.init,v 1.1 2004/08/08 17:37:46 stuart Exp $
depend() {
need net
}
start() {
ebegin "Starting mini_httpd"
if [ ! -d "$MINI_HTTPD_DOCROOT" ]; then
eend 1 "MINI_HTTPD_DOCROOT not set correctly in /etc/conf.d/mini_httpd"
exit 1
fi
cd $MINI_HTTPD_DOCROOT
if [ $? -ne 0 ]; then
eend $? "ERROR: cannot change to docroot \"$MINI_HTTPD_DOCROOT\""
fi
start-stop-daemon --quiet --start --startas /usr/sbin/mini_httpd \
--pidfile /var/run/mini_httpd.pid -- ${MINI_HTTPD_OPTS}
eend $?
}
stop() {
local rc
ebegin "Stopping mini_httpd"
start-stop-daemon --quiet --stop --pidfile /var/run/mini_httpd.pid
rc=$?
rm -f /var/run/mini_httpd.pid
eend $rc
}
|