[4.1] b8ff3f5 Source the default params only if needed

Federico G. Schwindt fgsch at lodoss.net
Fri Sep 4 15:54:52 CEST 2015


commit b8ff3f5f2c8c7b00cbc172d623871dcef9e535a1
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date:   Mon Aug 3 14:05:32 2015 +0100

    Source the default params only if needed
    
    Makes this work with multiple instances under systemd.
    Discussed with ingvar on irc.

diff --git a/redhat/varnish_reload_vcl b/redhat/varnish_reload_vcl
index be3c21a..2f47f3e 100755
--- a/redhat/varnish_reload_vcl
+++ b/redhat/varnish_reload_vcl
@@ -33,8 +33,10 @@ VARNISH_SECRET_FILE=\"$VARNISH_SECRET_FILE\"
 "
 }
 
-# Read configuration
-. /etc/sysconfig/varnish
+# Fallback to the default configuration
+if [ -z "$VARNISH_VCL_CONF" ]; then
+	. /etc/sysconfig/varnish
+fi
 
 $debug && print_debug
 



More information about the varnish-commit mailing list