aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2015-09-30 23:42:48 +0200
committerdoktornotor <notordoktor@gmail.com>2015-09-30 23:42:48 +0200
commit3c8f45ec4be4da9b194cbca9aed0da5ddf834a10 (patch)
tree64026f0994f12891d6ec964b682aa11053d0bebc
parentca4a5a1af57903b6d1c8607ab6ef33f5fe982705 (diff)
downloadpfsense-packages-3c8f45ec4be4da9b194cbca9aed0da5ddf834a10.tar.gz
pfsense-packages-3c8f45ec4be4da9b194cbca9aed0da5ddf834a10.tar.bz2
pfsense-packages-3c8f45ec4be4da9b194cbca9aed0da5ddf834a10.zip
Fix squidclamav.conf.sample handling to match the rest of the config files
-rwxr-xr-xconfig/squid3/34/squid.inc16
1 files changed, 7 insertions, 9 deletions
diff --git a/config/squid3/34/squid.inc b/config/squid3/34/squid.inc
index dce1f5d3..a3134736 100755
--- a/config/squid3/34/squid.inc
+++ b/config/squid3/34/squid.inc
@@ -1558,15 +1558,13 @@ EOF;
squid_check_clamav_user('clamav');
// patch sample files to pfsense dirs
// squidclamav.conf
- if (!file_exists(SQUID_LOCALBASE . "/etc/c-icap/squidclamav.conf.sample")) {
- if (file_exists(SQUID_LOCALBASE . "/etc/c-icap/squidclamav.conf.default")) {
- $sample_file = file_get_contents(SQUID_LOCALBASE . "/etc/c-icap/squidclamav.conf.default");
- $clamav_m[0] = "@/var/run/clamav/clamd.ctl@";
- $clamav_m[1] = "@http\://proxy.domain.dom/cgi-bin/clwarn.cgi@";
- $clamav_r[0] = "/var/run/clamav/clamd.sock";
- $clamav_r[1] = "{$config['system']['webgui']['protocol']}://{$config['system']['hostname']}.{$config['system']['domain']}/squid_clwarn.php";
- file_put_contents(SQUID_LOCALBASE . "/etc/c-icap/squidclamav.conf.sample", preg_replace($clamav_m, $clamav_r, $sample_file), LOCK_EX);
- }
+ if (file_exists(SQUID_LOCALBASE . "/etc/c-icap/squidclamav.conf.default")) {
+ $sample_file = file_get_contents(SQUID_LOCALBASE . "/etc/c-icap/squidclamav.conf.default");
+ $clamav_m[0] = "@/var/run/clamav/clamd.ctl@";
+ $clamav_m[1] = "@http\://proxy.domain.dom/cgi-bin/clwarn.cgi@";
+ $clamav_r[0] = "/var/run/clamav/clamd.sock";
+ $clamav_r[1] = "{$config['system']['webgui']['protocol']}://{$config['system']['hostname']}.{$config['system']['domain']}/squid_clwarn.php";
+ file_put_contents(SQUID_LOCALBASE . "/etc/c-icap/squidclamav.conf.sample", preg_replace($clamav_m, $clamav_r, $sample_file), LOCK_EX);
}
// c-icap.conf
// make a backup of default c-icap.conf.sample first