This makes it possible to use the same reload script with different systemd
instances.

OK?
From 61490d57b3fb972b228fb7ac6084e48f9ed97065 Mon Sep 17 00:00:00 2001
From: "Federico G. Schwindt" <[email protected]>
Date: Mon, 27 Jul 2015 16:15:50 +0100
Subject: [PATCH 1/3] Only load the default config if the env is not set

This makes it possible to use the same reload script with different
systemd instances.
---
 redhat/varnish_reload_vcl | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

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
 
-- 
2.1.4

_______________________________________________
varnish-dev mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev

Reply via email to