Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 362810 Details for
Bug 480252
www-servers/varnish - add support for running multiple instances
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
init script patch for multiple instances support
initscript.diff (text/plain), 2.63 KB, created by
frank
on 2013-11-08 20:10:20 UTC
(
hide
)
Description:
init script patch for multiple instances support
Filename:
MIME Type:
Creator:
frank
Created:
2013-11-08 20:10:20 UTC
Size:
2.63 KB
patch
obsolete
>--- varnishd 2013-11-08 20:55:46.445981048 +0100 >+++ varnishd.new 2013-11-08 20:56:34.149313522 +0100 >@@ -9,6 +9,26 @@ > description_configtest="Run syntax tests for configuration files." > description_reload="Reloads the configuration." > >+CONF="${SVCNAME#*.}" >+CONFBASE="/etc/conf.d/varnishd" >+[ -z "${PIDBASE}" ] && PIDBASE="/var/run/varnishd" >+[ "${CONF}" = "varnishd" ] && CONF='' >+ >+if [ -n "${CONF}" ]; then >+ PIDFILE="${PIDBASE}.${CONF}.pid" >+ CONFSRC="${CONFBASE}.${CONF}" >+ INSTANCE="${CONF}" >+ if [ -f "${CONFSRC}" ]; then >+ . "${CONFSRC}" >+ else >+ eerror "The configuration file $CONFSRC was not found!" >+ fi >+else >+ PIDFILE="${PIDBASE}.pid" >+ CONFSRC="${CONFBASE}" >+ INSTANCE="${HOSTNAME}" >+fi >+ > depend() { > need net > } >@@ -34,24 +54,24 @@ > checkconfig || return 1 > > ebegin "Starting varnish" >- start-stop-daemon --quiet --start --pidfile /var/run/varnishd.pid --exec ${VARNISHD} -- -P /var/run/varnishd.pid ${VARNISHD_OPTS} &> /dev/null >+ start-stop-daemon --quiet --start --pidfile ${PIDFILE} --exec ${VARNISHD} -- -n ${INSTANCE} -P ${PIDFILE} ${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} >+ start-stop-daemon --quiet --start --pidfile ${PIDFILE}.ncsa --exec /usr/bin/varnishncsa -- -n ${INSTANCE} -D -P ${PIDFILE}.ncsa ${VARNISHNCSA_ARGS} > eend $? > fi > } > > stop() { > ebegin "Stopping varnish" >- start-stop-daemon --quiet --stop --pidfile /var/run/varnishd.pid >+ start-stop-daemon --quiet --stop --pidfile ${PIDFILE} > eend $? > >- if [ -e /var/run/varnishncsa.pid ]; then >+ if [ -e ${PIDFILE}.ncsa ]; then > ebegin "Stopping varnish logging" >- start-stop-daemon --quiet --stop --pidfile /var/run/varnishncsa.pid >+ start-stop-daemon --quiet --stop --pidfile ${PIDFILE}.ncsa > eend $? > fi > } >@@ -61,7 +81,7 @@ > > ebegin "Reloading varnish" > >- $VARNISHADM vcl.list >/dev/null 2>&1 >+ $VARNISHADM -n ${INSTANCE} vcl.list >/dev/null 2>&1 > ret=$? > if [ $ret -ne 0 ]; then > eerror "${SVCNAME} cannot list configuration" >@@ -69,14 +89,14 @@ > fi > > new_config="reload_$(date +%FT%H:%M:%S)" >- $VARNISHADM vcl.load $new_config $CONFIGFILE >/dev/null 2>&1 >+ $VARNISHADM -n ${INSTANCE} vcl.load $new_config $CONFIGFILE >/dev/null 2>&1 > ret=$? > if [ $ret -ne 0 ]; then > eerror "${SVCNAME} cannot load configuration" > return 1 > fi > >- $VARNISHADM vcl.use $new_config >/dev/null 2>&1 >+ $VARNISHADM -n ${INSTANCE} vcl.use $new_config >/dev/null 2>&1 > ret=$? > if [ $ret -ne 0 ]; then > eerror "${SVCNAME} cannot switch configuration"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 480252
: 362810