diff options
author | root <root@rshg054.dnsready.net> | 2012-08-16 00:02:36 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-08-16 00:02:36 +0000 |
commit | 0fc1870f2eadde8cb06004be1cbe8d1a4333aa69 (patch) | |
tree | 09ae142c72b3ef3bba14bcd0fbd982446585d894 /extra/varnish/rc.varnish | |
parent | 8f1eb849d6de0031d4d91fb6d8780828b1ba924b (diff) |
Thu Aug 16 00:02:36 UTC 2012
Diffstat (limited to 'extra/varnish/rc.varnish')
-rw-r--r-- | extra/varnish/rc.varnish | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/extra/varnish/rc.varnish b/extra/varnish/rc.varnish index 2841665e5..352f07dbd 100644 --- a/extra/varnish/rc.varnish +++ b/extra/varnish/rc.varnish @@ -4,27 +4,6 @@ . /etc/rc.d/functions . /etc/conf.d/varnish -reload_vcl() { - local activecfg newcfg - - if [[ -z $VARNISH_CFG ]]; then - printf '==> ERROR: VARNISH_CFG is undefined in /etc/conf.d/varnish!\n' - return 1 - fi - - activecfg=$(varnishadm 'vcl.list' | awk '/active/ { print $3 }') - if [[ -z $activecfg ]]; then - printf '==> ERROR: No active VCL found!\n' - return 1 - fi - - printf -v newcfg 'vcl-%(%s)T' -1 - - varnishadm "vcl.load $newcfg $VARNISH_CFG" && - varnishadm "vcl.use $newcfg" && - varnishadm "vcl.discard $activecfg" || return 1 -} - pidfile=/run/varnish.pid if [[ -r $pidfile ]]; then read -r PID < "$pidfile" @@ -62,10 +41,9 @@ case $1 in $0 start ;; reload) - stat_busy "Recompiling and Reloading VCL" - reload_vcl && stat_done || stat_fail + status "Recompiling and Reloading VCL" varnish-vcl-reload $VARNISH_CFG ;; *) - echo "usage: $0 {start|stop|restart}" + echo "usage: $0 {start|stop|restart|reload}" ;; esac |