From 0becc62f8278ffd82488f42657455c8e77df99fd Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Tue, 8 Oct 2024 22:18:33 +0200 Subject: [PATCH] clamav: freshclam: Add documented options Enable syslogging Signed-off-by: Paul Donald --- net/clamav/files/freshclam.config | 19 ++++++++++++++++ net/clamav/files/freshclam.init | 38 ++++++++++++++++++++++++++++++- 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/net/clamav/files/freshclam.config b/net/clamav/files/freshclam.config index 66c850a90d..bd1ad30c2d 100644 --- a/net/clamav/files/freshclam.config +++ b/net/clamav/files/freshclam.config @@ -1,7 +1,26 @@ config freshclam 'freshclam' option freshclam_config_file '/etc/clamav/freshclam.conf' + option LogTime 'no' + option LogVerbose 'no' + option LogSyslog 'yes' + option Debug 'no' + option LogFacility 'LOG_LOCAL6' + option Foreground 'no' + option PidFile '/var/run/clamav/freshclam.pid' option DatabaseMirror 'database.clamav.net' option NotifyClamd '/etc/clamav/clamd.conf' option DatabaseOwner 'root' option CompressLocalDatabase 'yes' option DatabaseDirectory '/usr/share/clamav' + option DNSDatabaseInfo 'current.cvd.clamav.net' + option ScriptedUpdates 'yes' + option DatabaseCustomURL '' # can take file:// ftp:// http(s):// + option ConnectTimeout '60' + option ReceiveTimeout '60' + option PrivateMirror '' # e.g. mirror1.example.com + option Checks '12' + option TestDatabases 'yes' + option Bytecode 'yes' + option ExtraDatabase ' ' + option ExcludeDatabase ' ' + diff --git a/net/clamav/files/freshclam.init b/net/clamav/files/freshclam.init index 6c7d6e7a18..804b74fc1e 100644 --- a/net/clamav/files/freshclam.init +++ b/net/clamav/files/freshclam.init @@ -11,11 +11,29 @@ FRESHCLAM_CONFIGFILE="/tmp/clamav/freshclam.conf" validate_freshclam_section() { uci_load_validate freshclam freshclam "$1" "$2" \ 'freshclam_config_file:string' \ + 'LogTime:string' \ + 'LogVerbose:string' \ + 'LogSyslog:string' \ + 'Debug:string' \ + 'LogFacility:string' \ + 'Foreground:string' \ + 'PidFile:string' \ 'DatabaseMirror:string' \ 'NotifyClamd:string' \ 'DatabaseOwner:string' \ 'CompressLocalDatabase:string' \ - 'DatabaseDirectory:string:' + 'DatabaseDirectory:string' \ + 'DNSDatabaseInfo:string' \ + 'ScriptedUpdates:string' \ + 'DatabaseCustomURL:string' \ + 'ConnectTimeout:string' \ + 'ReceiveTimeout:string' \ + 'PrivateMirror:string' \ + 'Checks:string' \ + 'TestDatabases:string' \ + 'Bytecode:string' \ + 'ExtraDatabase:string' \ + 'ExcludeDatabase:string' } start_freshclam_instance() { @@ -34,11 +52,29 @@ start_freshclam_instance() { ln -sf "$freshclam_config_file" "$FRESHCLAM_CONFIGFILE" { + echo "LogTime " "$LogTime" + echo "LogVerbose " "$LogVerbose" + echo "LogSyslog " "$LogSyslog" + echo "Debug " "$Debug" + echo "LogFacility " "$LogFacility" + echo "Foreground " "$Foreground" + echo "PidFile " "$PidFile" echo "DatabaseMirror " "$DatabaseMirror" echo "NotifyClamd " "$NotifyClamd" echo "DatabaseOwner " "$DatabaseOwner" echo "CompressLocalDatabase " "$CompressLocalDatabase" echo "DatabaseDirectory " "$DatabaseDirectory" + echo "DNSDatabaseInfo " "$DNSDatabaseInfo" + echo "ScriptedUpdates " "$ScriptedUpdates" + echo "DatabaseCustomURL " "$DatabaseCustomURL" + echo "ConnectTimeout " "$ConnectTimeout" + echo "ReceiveTimeout " "$ReceiveTimeout" + echo "PrivateMirror " "$PrivateMirror" + echo "Checks " "$Checks" + echo "TestDatabases " "$TestDatabases" + echo "Bytecode " "$Bytecode" + echo "ExtraDatabase " "$ExtraDatabase" + echo "ExcludeDatabase " "$ExcludeDatabase" } > "$FRESHCLAM_CONFIGFILE" procd_open_instance