Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 352864 Details for
Bug 475600
www-servers/varnish - add configuration sanity test and reload functionality to init.d script
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
varnish.initd.patch
varnish.initd.patch (text/plain), 1.89 KB, created by
Tomáš Mózes
on 2013-07-08 16:30:30 UTC
(
hide
)
Description:
varnish.initd.patch
Filename:
MIME Type:
Creator:
Tomáš Mózes
Created:
2013-07-08 16:30:30 UTC
Size:
1.89 KB
patch
obsolete
>--- /usr/portage/www-servers/varnish/files/varnishd.initd 2013-03-14 13:31:33.000000000 +0100 >+++ /etc/init.d/varnishd 2013-07-08 17:06:58.378153445 +0200 >@@ -3,13 +3,38 @@ > # Distributed under the terms of the GNU General Public License v2 > # $Header: /var/cvsroot/gentoo-x86/www-servers/varnish/files/varnishd.initd,v 1.8 2013/03/14 12:18:17 blueness Exp $ > >+extra_commands="configtest" >+extra_started_commands="reload" >+ >+description_configtest="Run syntax tests for configuration files." >+description_reload="Reloads the configuration." >+ > depend() { > need net > } > >+configtest() { >+ ebegin "Checking ${SVCNAME} configuration" >+ checkconfig >+ eend $? >+} >+ >+checkconfig() { >+ ${VARNISHD} -C -f ${CONFIGFILE} >/dev/null 2>&1 >+ ret=$? >+ if [ $ret -ne 0 ]; then >+ eerror "${SVCNAME} has detected an error in your setup:" >+ ${VARNISHD} -C -f ${CONFIGFILE} >+ fi >+ >+ return $ret >+} >+ > start() { >+ checkconfig || return 1 >+ > ebegin "Starting varnish" >- start-stop-daemon --quiet --start --pidfile /var/run/varnishd.pid --exec /usr/sbin/varnishd -- -P /var/run/varnishd.pid ${VARNISHD_OPTS} &> /dev/null >+ start-stop-daemon --quiet --start --pidfile /var/run/varnishd.pid --exec ${VARNISHD} -- -P /var/run/varnishd.pid ${VARNISHD_OPTS} &> /dev/null > eend $? > > if [ "${VARNISHNCSA_ARGS}" != "" ]; then >@@ -30,3 +55,33 @@ > eend $? > fi > } >+ >+reload() { >+ checkconfig || return 1 >+ >+ ebegin "Reloading varnish" >+ >+ $VARNISHADM vcl.list >/dev/null 2>&1 >+ ret=$? >+ if [ $ret -ne 0 ]; then >+ eerror "${SVCNAME} cannot list configuration" >+ return 1 >+ fi >+ >+ new_config="reload_$(date +%FT%H:%M:%S)" >+ $VARNISHADM 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 >+ ret=$? >+ if [ $ret -ne 0 ]; then >+ eerror "${SVCNAME} cannot switch configuration" >+ return 1 >+ fi >+ >+ eend 0 >+}
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 475600
:
352862
| 352864