clamav: freshclam: Add documented options
authorPaul Donald <newtwen+github@gmail.com>
Tue, 8 Oct 2024 20:18:33 +0000 (22:18 +0200)
committerRosen Penev <rosenp@gmail.com>
Sun, 27 Oct 2024 22:59:04 +0000 (15:59 -0700)
Enable syslogging

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
net/clamav/files/freshclam.config
net/clamav/files/freshclam.init

index 66c850a90d9924b08051adbfe563aae2a62062a4..bd1ad30c2d4f5761e1015002c5089d709eb627ac 100644 (file)
@@ -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 ' '
+
index 6c7d6e7a18526c8b7645f7f85c036cd0d98e9c0a..804b74fc1eca37f5bde11358ab1c361a12559bde 100644 (file)
@@ -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