aboutsummaryrefslogtreecommitdiffstats
path: root/extra/mini_httpd/mini_httpd.initd
diff options
context:
space:
mode:
Diffstat (limited to 'extra/mini_httpd/mini_httpd.initd')
-rw-r--r--extra/mini_httpd/mini_httpd.initd29
1 files changed, 29 insertions, 0 deletions
diff --git a/extra/mini_httpd/mini_httpd.initd b/extra/mini_httpd/mini_httpd.initd
new file mode 100644
index 0000000000..ccaf53d31f
--- /dev/null
+++ b/extra/mini_httpd/mini_httpd.initd
@@ -0,0 +1,29 @@
+#!/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.2 2007/08/26 21:20:21 bangert 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
+ 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
+}