aboutsummaryrefslogtreecommitdiffstats
path: root/extra/mini_httpd/mini_httpd.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-01-27 09:16:15 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-01-27 09:16:15 +0000
commit9fc1b28e24cd53442793b6b8c8dd319ae6f23f7b (patch)
tree26da971ccbeebd6a60553455791b4b20808b1243 /extra/mini_httpd/mini_httpd.initd
parentd41b368a2fe77470d3a1ba68c9beb7a2712d36aa (diff)
downloadaports-9fc1b28e24cd53442793b6b8c8dd319ae6f23f7b.tar.gz
aports-9fc1b28e24cd53442793b6b8c8dd319ae6f23f7b.tar.bz2
aports-9fc1b28e24cd53442793b6b8c8dd319ae6f23f7b.tar.xz
extra/mini_httpd: new aport
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
+}