mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
clamav: update to 0.99.2
added option DatabaseDirectory update depends on musl-fts libraries Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
This commit is contained in:
@@ -32,3 +32,4 @@ config clamav 'clamav'
|
||||
option LocalSocket '/var/run/clamav/clamd.sock'
|
||||
option User 'nobody'
|
||||
option ExitOnOOM 'yes'
|
||||
option DatabaseDirectory '/usr/share/clamav'
|
||||
|
||||
@@ -42,7 +42,8 @@ validate_clamav_section() {
|
||||
'MaxFileSize:string' \
|
||||
'LocalSocket:string' \
|
||||
'User:string' \
|
||||
'ExitOnOOM:string'
|
||||
'ExitOnOOM:string' \
|
||||
'DatabaseDirectory:string'
|
||||
}
|
||||
|
||||
start_service() {
|
||||
@@ -50,14 +51,15 @@ start_service() {
|
||||
StreamMaxPort MaxThreads ReadTimeout CommandReadTimeout MaxDirectoryRecursion \
|
||||
FollowFileSymlinks FollowDirectorySymlinks SelfCheck DetectPUA ScanPE DisableCertCheck \
|
||||
ScanELF DetectBrokenExecutables ScanOLE2 ScanPDF ScanSWF ScanMail ScanPartialMessages \
|
||||
ScanArchive TemporaryDirectory ArchiveBlockEncrypted MaxFileSize LocalSocket User
|
||||
ScanArchive TemporaryDirectory ArchiveBlockEncrypted MaxFileSize LocalSocket User \
|
||||
DatabaseDirectory
|
||||
|
||||
validate_clamav_section clamav || {
|
||||
echo "validation failed"
|
||||
return 1
|
||||
}
|
||||
|
||||
mkdir -p /usr/share/clamav
|
||||
mkdir -p $DatabaseDirectory
|
||||
mkdir -p /etc/clamav/
|
||||
mkdir -p /var/run/clamav/
|
||||
chmod a+rw /var/run/clamav
|
||||
@@ -97,6 +99,7 @@ start_service() {
|
||||
echo "LocalSocket " $LocalSocket >> $CLAMD_CONFIGFILE
|
||||
echo "User " $User >> $CLAMD_CONFIGFILE
|
||||
echo "ExitOnOOM " $ExitOnOOM >> $CLAMD_CONFIGFILE
|
||||
echo "DatabaseDirectory " $DatabaseDirectory >> $CLAMD_CONFIGFILE
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command $PROG -c $CLAMD_CONFIGFILE
|
||||
|
||||
@@ -5,3 +5,4 @@ config freshclam 'freshclam'
|
||||
option NotifyClamd '/etc/clamav/clamd.conf'
|
||||
option DatabaseOwner 'root'
|
||||
option CompressLocalDatabase 'yes'
|
||||
option DatabaseDirectory '/usr/share/clamav'
|
||||
|
||||
@@ -15,11 +15,13 @@ validate_freshclam_section() {
|
||||
'DatabaseMirror:string' \
|
||||
'NotifyClamd:string' \
|
||||
'DatabaseOwner:string' \
|
||||
'CompressLocalDatabase:string:'
|
||||
'CompressLocalDatabase:string' \
|
||||
'DatabaseDirectory:string:'
|
||||
}
|
||||
|
||||
start_service() {
|
||||
local freshclam_config_file UpdateLogFile DatabaseOwner NotifyClamd DatabaseMirror
|
||||
local freshclam_config_file UpdateLogFile DatabaseOwner NotifyClamd DatabaseMirror \
|
||||
DatabaseDirectory
|
||||
|
||||
validate_freshclam_section freshclam || {
|
||||
echo "validation failed"
|
||||
@@ -28,7 +30,7 @@ start_service() {
|
||||
|
||||
[ -f /tmp/freshclam.pid ] && echo "already running" && return 0
|
||||
|
||||
mkdir -p /usr/share/clamav
|
||||
mkdir -p $DatabaseDirectory
|
||||
mkdir -p /etc/clamav
|
||||
touch /tmp/freshclam.log
|
||||
touch /tmp/freshclam.pid
|
||||
@@ -41,6 +43,7 @@ start_service() {
|
||||
echo "NotifyClamd " $NotifyClamd >> $FRESHCLAM_CONFIGFILE
|
||||
echo "DatabaseOwner " $DatabaseOwner >> $FRESHCLAM_CONFIGFILE
|
||||
echo "CompressLocalDatabase " $CompressLocalDatabase >> $FRESHCLAM_CONFIGFILE
|
||||
echo "DatabaseDirectory " $DatabaseDirectory >> $FRESHCLAM_CONFIGFILE
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command $PROG -d --config-file=$FRESHCLAM_CONFIGFILE -p /tmp/freshclam.pid --no-warnings
|
||||
|
||||
Reference in New Issue
Block a user