aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2015-09-27 12:34:37 +0200
committerdoktornotor <notordoktor@gmail.com>2015-09-27 12:34:37 +0200
commitbdd002b5ab082d9713216f051aa12dce2783d0d9 (patch)
tree129970e45b8fe2341dae1d3b904c2bc0e80a0de9 /config
parent457830f4d200804df3a27c484883a32e4689a4c5 (diff)
downloadpfsense-packages-bdd002b5ab082d9713216f051aa12dce2783d0d9.tar.gz
pfsense-packages-bdd002b5ab082d9713216f051aa12dce2783d0d9.tar.bz2
pfsense-packages-bdd002b5ab082d9713216f051aa12dce2783d0d9.zip
Honor logdir settings for reverse proxy as well; always provide a default value if not configured
Diffstat (limited to 'config')
-rwxr-xr-xconfig/squid3/34/squid.inc11
1 files changed, 8 insertions, 3 deletions
diff --git a/config/squid3/34/squid.inc b/config/squid3/34/squid.inc
index a0bf7c87..a04e624e 100755
--- a/config/squid3/34/squid.inc
+++ b/config/squid3/34/squid.inc
@@ -1952,20 +1952,25 @@ function squid_resync($via_rpc = "no") {
$log_dir = "";
$squid_enabled = false;
- // check if Squid is enabled
if (is_array($config['installedpackages']['squid']['config'])) {
+ // check if Squid is enabled
if ($config['installedpackages']['squid']['config'][0]['active_interface'] != "") {
- $log_dir = $config['installedpackages']['squid']['config'][0]['log_dir'] . '/';
$squid_enabled = true;
}
} elseif (is_array($config['installedpackages']['squidreversegeneral']['config'])) {
// check if squidreverse is enabled
if ($config['installedpackages']['squidreversegeneral']['config'][0]['reverse_interface'] != "") {
- $log_dir = "/var/squid/logs/";
$squid_enabled = true;
}
}
// create log dir if required
+ if (is_array($config['installedpackages']['squid']['config'])) {
+ if ($config['installedpackages']['squid']['config'][0]['active_interface'] != "") {
+ $log_dir = $config['installedpackages']['squid']['config'][0]['log_dir'] . '/';
+ }
+ } else {
+ $log_dir = "/var/squid/logs/";
+ }
if (!is_dir($log_dir)) {
log_error("Creating Squid log dir $log_dir");
safe_mkdir($log_dir, 0755);