aboutsummaryrefslogtreecommitdiffstats
path: root/config/squid3/34
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2015-09-26 19:52:08 +0200
committerdoktornotor <notordoktor@gmail.com>2015-09-26 19:52:08 +0200
commit611caad30cf3d486abbc7e55b515be93d7073b85 (patch)
tree5a45004d3d20d62ffddd79d4b2c82626d2000f6b /config/squid3/34
parent7ebe5d0978f0246f5170dc7e86ea1dd4ff5d1056 (diff)
downloadpfsense-packages-611caad30cf3d486abbc7e55b515be93d7073b85.tar.gz
pfsense-packages-611caad30cf3d486abbc7e55b515be93d7073b85.tar.bz2
pfsense-packages-611caad30cf3d486abbc7e55b515be93d7073b85.zip
make a backup of default c-icap config file on install
Diffstat (limited to 'config/squid3/34')
-rwxr-xr-xconfig/squid3/34/squid.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/config/squid3/34/squid.inc b/config/squid3/34/squid.inc
index 69cee12e..3e305936 100755
--- a/config/squid3/34/squid.inc
+++ b/config/squid3/34/squid.inc
@@ -336,6 +336,13 @@ function squid_install_command() {
"stop" => "/bin/ps awux | /usr/bin/grep \"sqpmon\" | /usr/bin/grep -v \"grep\" | /usr/bin/grep -v \"php\" | /usr/bin/awk '{ print $2 }' | /usr/bin/xargs kill")
);
+ // make a backup of default c-icap config file on install; also see squid_resync_antivirus() function below
+ if (!file_exists(SQUID_LOCALBASE . "/etc/c-icap/c-icap.conf.default")) {
+ if (file_exists(SQUID_LOCALBASE . "/etc/c-icap/c-icap.conf.sample")) {
+ copy(SQUID_LOCALBASE . "/etc/c-icap/c-icap.conf.sample", SQUID_LOCALBASE . "/etc/c-icap/c-icap.conf.default");
+ }
+ }
+
foreach (array(SQUID_CONFBASE, SQUID_ACLDIR, SQUID_SSL_DB) as $dir) {
safe_mkdir($dir, 0755);
squid_chown_recursive($dir, SQUID_UID, SQUID_GID);