diff options
author | Renato Botelho <renato@netgate.com> | 2015-10-10 10:04:37 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-10-10 10:04:37 -0300 |
commit | 675b121ee2de4c1c430219053a9ba5f0d6a7e568 (patch) | |
tree | e96b7aedee3d802dfbd6e6a7bc96d14e54a473b6 /config/squid3/34/squid_antivirus.inc | |
parent | 3bd5c2bd64800857ebd86b98668d9d499735c536 (diff) | |
parent | d2d55881b7bd9ed59baae9d7323f6e135f138a0e (diff) | |
download | pfsense-packages-675b121ee2de4c1c430219053a9ba5f0d6a7e568.tar.gz pfsense-packages-675b121ee2de4c1c430219053a9ba5f0d6a7e568.tar.bz2 pfsense-packages-675b121ee2de4c1c430219053a9ba5f0d6a7e568.zip |
Merge pull request #1092 from doktornotor/patch-2
Diffstat (limited to 'config/squid3/34/squid_antivirus.inc')
-rw-r--r-- | config/squid3/34/squid_antivirus.inc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/config/squid3/34/squid_antivirus.inc b/config/squid3/34/squid_antivirus.inc index a57cb288..03b9e129 100644 --- a/config/squid3/34/squid_antivirus.inc +++ b/config/squid3/34/squid_antivirus.inc @@ -73,15 +73,14 @@ function squid_install_freshclam_cron($should_install) { return; } - if (is_array($config['installedpackages']['squidantivirus'])) { - $antivirus_config = $config['installedpackages']['squidantivirus']['config'][0]; - } else { - $antivirus_config = array(); - } - $freshclam_cmd = (SQUID_BASE . "/bin/freshclam --config-file=" . SQUID_BASE . "/etc/freshclam.conf"); if (($should_install) && (squid_enabled())) { - if ($antivirus_config['clamav_update'] != "0") { + if (is_array($config['installedpackages']['squidantivirus'])) { + $antivirus_config = $config['installedpackages']['squidantivirus']['config'][0]; + } else { + $antivirus_config = array(); + } + if ($antivirus_config['clamav_update'] != "") { log_error("[squid] Adding freshclam cronjob."); $minutes = ($antivirus_config['clamav_update'] * 60); install_cron_job("{$freshclam_cmd}", true, "*/{$minutes}", "*", "*", "*", "*", "clamav"); |