diff options
author | doktornotor <notordoktor@gmail.com> | 2015-10-10 12:10:30 +0200 |
---|---|---|
committer | doktornotor <notordoktor@gmail.com> | 2015-10-10 12:10:30 +0200 |
commit | 50e1a6c0146b3ca4a6958cf26206e8f2691648a8 (patch) | |
tree | ccafe713b71afff097f992716fa19972a2de3250 /config/squid3 | |
parent | 8bc1e775e91439d3abbe30f1da53e11d9e390403 (diff) | |
download | pfsense-packages-50e1a6c0146b3ca4a6958cf26206e8f2691648a8.tar.gz pfsense-packages-50e1a6c0146b3ca4a6958cf26206e8f2691648a8.tar.bz2 pfsense-packages-50e1a6c0146b3ca4a6958cf26206e8f2691648a8.zip |
Fix freshclam cronjob frequency handling
Reported by itsol at https://forum.pfsense.org/index.php?topic=100167.msg561126#msg561126
Diffstat (limited to 'config/squid3')
-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"); |