mirror of
https://github.com/openwrt/packages.git
synced 2026-04-15 19:02:09 +00:00
clamav: freshclam: Add documented options
Enable syslogging Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This commit is contained in:
@@ -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 ' '
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user