From 611caad30cf3d486abbc7e55b515be93d7073b85 Mon Sep 17 00:00:00 2001 From: doktornotor Date: Sat, 26 Sep 2015 19:52:08 +0200 Subject: make a backup of default c-icap config file on install --- config/squid3/34/squid.inc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'config/squid3') 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); -- cgit v1.2.3