Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 502972
Collapse All | Expand All

(-)a/www-servers/varnish/files/varnishd.confd-r1 (-2 / +6 lines)
Lines 12-21 VARNISHD_OPTS="-a 127.0.0.1:8080 -b 127.0.0.1:80" Link Here
12
# the config file
12
# the config file
13
#VARNISHD_OPTS="-a 127.0.0.1:8080 -f $CONFIGFILE"
13
#VARNISHD_OPTS="-a 127.0.0.1:8080 -f $CONFIGFILE"
14
14
15
# arguments passed to varnishncsa
15
# Arguments passed to varnishncsa
16
# please see the varnishncsa man page for more options
16
# Please see varnishncsa(1) for more options
17
VARNISHNCSA_ARGS="-c -a -w /var/log/varnish/access.log"
17
VARNISHNCSA_ARGS="-c -a -w /var/log/varnish/access.log"
18
18
19
# Arguments passed to varnishncsa -F option
20
# Please see varnishncsa(1) for more options
21
# VARNISHNCSA_LOGFORMAT='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-agent}i"'
22
19
# We need to increase the number of open files (-n)
23
# We need to increase the number of open files (-n)
20
# and the maximum amount off locked memory (-l)
24
# and the maximum amount off locked memory (-l)
21
# See bug #459142
25
# See bug #459142
(-)a/www-servers/varnish/files/varnishd.initd-r1 (-6 / +13 lines)
Lines 1-5 Link Here
1
#!/sbin/runscript
1
#!/sbin/runscript
2
# Copyright 1999-2013 Gentoo Foundation
2
# Copyright 1999-2014 Gentoo Foundation
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Header: /var/cvsroot/gentoo-x86/www-servers/varnish/files/varnishd.initd-r1,v 1.1 2013/07/08 22:11:35 blueness Exp $
4
# $Header: /var/cvsroot/gentoo-x86/www-servers/varnish/files/varnishd.initd-r1,v 1.1 2013/07/08 22:11:35 blueness Exp $
5
5
Lines 34-57 start() { Link Here
34
	checkconfig || return 1
34
	checkconfig || return 1
35
35
36
	ebegin "Starting varnish"
36
	ebegin "Starting varnish"
37
	start-stop-daemon --quiet --start --pidfile /var/run/varnishd.pid --exec ${VARNISHD} -- -P /var/run/varnishd.pid ${VARNISHD_OPTS} &> /dev/null
37
	start-stop-daemon --quiet --start --pidfile /run/varnishd.pid \
38
		--exec ${VARNISHD} -- \
39
		-P /run/varnishd.pid \
40
		${VARNISHD_OPTS} &> /dev/null
38
	eend $?
41
	eend $?
39
42
40
	if [ "${VARNISHNCSA_ARGS}" != "" ]; then
43
	if [ "${VARNISHNCSA_ARGS}" != "" ]; then
41
		ebegin "Starting varnish logging"
44
		ebegin "Starting varnish logging"
42
		start-stop-daemon --quiet --start --pidfile /var/run/varnishncsa.pid --exec /usr/bin/varnishncsa -- -D -P /var/run/varnishncsa.pid ${VARNISHNCSA_ARGS}
45
		start-stop-daemon --quiet --start --pidfile /run/varnishncsa.pid \
46
			--exec /usr/bin/varnishncsa -- \
47
			-D -P /run/varnishncsa.pid \
48
			${VARNISHNCSA_ARGS} \
49
			${VARNISHNCSA_LOGFORMAT:+-F "${VARNISHNCSA_LOGFORMAT}"}
43
		eend $?
50
		eend $?
44
	fi
51
	fi
45
}
52
}
46
53
47
stop() {
54
stop() {
48
	ebegin "Stopping varnish"
55
	ebegin "Stopping varnish"
49
	start-stop-daemon --quiet --stop --pidfile /var/run/varnishd.pid
56
	start-stop-daemon --quiet --stop --pidfile /run/varnishd.pid
50
	eend $?
57
	eend $?
51
58
52
	if [ -e /var/run/varnishncsa.pid ]; then
59
	if [ -e /run/varnishncsa.pid ]; then
53
		ebegin "Stopping varnish logging"
60
		ebegin "Stopping varnish logging"
54
		start-stop-daemon --quiet --stop --pidfile /var/run/varnishncsa.pid
61
		start-stop-daemon --quiet --stop --pidfile /run/varnishncsa.pid
55
		eend $?
62
		eend $?
56
	fi
63
	fi
57
}
64
}

Return to bug 502972