diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-04-11 10:01:26 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-04-11 10:02:01 +0000 |
commit | c452528a37a334dba4beaf8f3595f69556187d47 (patch) | |
tree | 739346631d818ba2dd75e37b465899d0c16aa3b9 /testing/varnish/varnishd.initd | |
parent | aa6f7efd4f5b46dd477ddabc120ec76ed3ebc631 (diff) | |
download | aports-c452528a37a334dba4beaf8f3595f69556187d47.tar.bz2 aports-c452528a37a334dba4beaf8f3595f69556187d47.tar.xz |
testing/varnish: new aport
High-performance HTTP accelerator
http://www.varnish-cache.org/
Diffstat (limited to 'testing/varnish/varnishd.initd')
-rwxr-xr-x | testing/varnish/varnishd.initd | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/testing/varnish/varnishd.initd b/testing/varnish/varnishd.initd new file mode 100755 index 0000000000..f65cce7122 --- /dev/null +++ b/testing/varnish/varnishd.initd @@ -0,0 +1,34 @@ +#!/sbin/runscript +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-servers/varnish/files/varnishd.initd,v 1.7 2009/08/30 06:28:07 hollow Exp $ + +depend() { + need net +} + +start() { + ebegin "Starting varnish" + #allow varnishd to lock logfile to memory + ulimit -l 82000 + start-stop-daemon --quiet --start --pidfile /var/run/varnishd.pid --exec /usr/sbin/varnishd -- -P /var/run/varnishd.pid ${VARNISHD_OPTS} &> /dev/null + eend $? + + if [ "${VARNISHNCSA_ARGS}" != "" ]; then + ebegin "Starting varnish logging" + start-stop-daemon --quiet --start --pidfile /var/run/varnishncsa.pid --exec /usr/bin/varnishncsa -- -D -P /var/run/varnishncsa.pid ${VARNISHNCSA_ARGS} + eend $? + fi +} + +stop() { + ebegin "Stopping varnish" + start-stop-daemon --quiet --stop --pidfile /var/run/varnishd.pid + eend $? + + if [ -e /var/run/varnishncsa.pid ]; then + ebegin "Stopping varnish logging" + start-stop-daemon --quiet --stop --pidfile /var/run/varnishncsa.pid + eend $? + fi +} |