diff options
author | Michele Noberasco <s4t4n@gentoo.org> | 2004-08-27 12:05:47 +0000 |
---|---|---|
committer | Michele Noberasco <s4t4n@gentoo.org> | 2004-08-27 12:05:47 +0000 |
commit | 807529f372995738fac2fb3bc2424c55fedebdaa (patch) | |
tree | df869469d20e8ef52eaabd625c48866b9a9f1066 /www-servers/bozohttpd/files/bozohttpd.initscript | |
parent | fix up gmp symlink and tidy src_compile (Manifest recommit) (diff) | |
download | gentoo-2-807529f372995738fac2fb3bc2424c55fedebdaa.tar.gz gentoo-2-807529f372995738fac2fb3bc2424c55fedebdaa.tar.bz2 gentoo-2-807529f372995738fac2fb3bc2424c55fedebdaa.zip |
Bump www-servers/bozohttpd to version 20040823...
Diffstat (limited to 'www-servers/bozohttpd/files/bozohttpd.initscript')
-rw-r--r-- | www-servers/bozohttpd/files/bozohttpd.initscript | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/www-servers/bozohttpd/files/bozohttpd.initscript b/www-servers/bozohttpd/files/bozohttpd.initscript new file mode 100644 index 000000000000..15d431d6663f --- /dev/null +++ b/www-servers/bozohttpd/files/bozohttpd.initscript @@ -0,0 +1,38 @@ +#!/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/bozohttpd/files/bozohttpd.initscript,v 1.1 2004/08/27 12:05:47 s4t4n Exp $ + +#NB: Config is in /etc/conf.d/bozohttpd + + +depend() { + need logger net +} + +checkconfig() { + if [ -z "$DATADIR" ] || [ -z "$BIND_ADDRESS" ] || [ -z "$LISTEN_PORT" ]; then + eerror "You need to setup DATADIR, BIND_ADDRESS and LISTEN PORT in /etc/conf.d/bozohttpd first" + return 1 + fi +} + +start() { + checkconfig || return 1 + + local params="" + + [ -n "$USER" ] && params="$params -U $USER" + [ -n "$INDEX_DEFAULT" ] && params="$params -x $INDEX_DEFAULT" + [ -n "$APPEND" ] && params="$params $APPEND" + + ebegin "Starting bozohttpd" + start-stop-daemon --start --exec /usr/bin/bozohttpd -- -b -i $BIND_ADDRESS -I $LISTEN_PORT -X ${params} $DATADIR + eend ${?} +} + +stop() { + ebegin "Stopping bozohttpd" + start-stop-daemon --stop --exec /usr/bin/bozohttpd + eend ${?} +} |