aboutsummaryrefslogtreecommitdiffstats
path: root/config/varnish3
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-12-01 19:05:27 -0200
committerRenato Botelho <garga@FreeBSD.org>2014-12-01 19:05:27 -0200
commitf9f0b2f31097db308a5b7affd8fc64738a246acd (patch)
treeba335876444ddc4d35a0d3aad21d74591556db46 /config/varnish3
parentef637f7c62891bcbe506599f8aad6d2345fb40a7 (diff)
downloadpfsense-packages-f9f0b2f31097db308a5b7affd8fc64738a246acd.tar.gz
pfsense-packages-f9f0b2f31097db308a5b7affd8fc64738a246acd.tar.bz2
pfsense-packages-f9f0b2f31097db308a5b7affd8fc64738a246acd.zip
Check if varnish is enabled before test config
Submitted by: Marcello Coutinho
Diffstat (limited to 'config/varnish3')
-rw-r--r--config/varnish3/varnish.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/config/varnish3/varnish.inc b/config/varnish3/varnish.inc
index 587d01bc..82b1cbca 100644
--- a/config/varnish3/varnish.inc
+++ b/config/varnish3/varnish.inc
@@ -122,6 +122,10 @@ function text_area_decode($text){
function varnish_check_config(){
global $savemsg;
+
+ if (!isset($config['installedpackages']['varnishsettings']['config'][0]['enablevarnish']))
+ return;
+
exec(VARNISH_LOCALBASE."/bin/varnishd -C -f /var/etc/default.vcl 2>&1",$output,$return);
if ($return >0){
$savemsg.= implode("<br>",$output);