Merge pull request #10518 from BKPepe/clamav_update
clamav: Update to version 0.101.4
This commit is contained in:
commit
cf73e1b014
4 changed files with 57 additions and 53 deletions
|
@ -8,12 +8,12 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=clamav
|
||||
PKG_VERSION:=0.101.3
|
||||
PKG_VERSION:=0.101.4
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://www.clamav.net/downloads/production/
|
||||
PKG_HASH:=68d42aac4a9cbde293288533a9a3c3d55863de38f2b8707c1ef2d987b1260338
|
||||
PKG_HASH:=0bf094f0919d158a578421d66bc2569c8c8181233ba162bb51722f98c802bccd
|
||||
|
||||
PKG_MAINTAINER:=Marko Ratkaj <marko.ratkaj@sartura.hr> \
|
||||
Lucian Cristian <lucian.cristian@gmail.com>
|
||||
|
|
|
@ -19,14 +19,14 @@ config clamav 'clamav'
|
|||
option ScanPE 'yes'
|
||||
option DisableCertCheck 'no'
|
||||
option ScanELF 'yes'
|
||||
option DetectBrokenExecutables 'no'
|
||||
option AlertBrokenExecutables 'no'
|
||||
option ScanOLE2 'yes'
|
||||
option ScanPDF 'yes'
|
||||
option ScanSWF 'yes'
|
||||
option ScanMail 'yes'
|
||||
option ScanPartialMessages 'no'
|
||||
option ScanArchive 'yes'
|
||||
option ArchiveBlockEncrypted 'yes'
|
||||
option AlertEncrypted 'yes'
|
||||
option MaxFileSize '10M'
|
||||
option TemporaryDirectory '/tmp'
|
||||
option LocalSocket '/var/run/clamav/clamd.sock'
|
||||
|
|
|
@ -30,7 +30,7 @@ validate_clamav_section() {
|
|||
'ScanPE:string' \
|
||||
'DisableCertCheck:string' \
|
||||
'ScanELF:string' \
|
||||
'DetectBrokenExecutables:string' \
|
||||
'AlertBrokenExecutables:string' \
|
||||
'ScanOLE2:string' \
|
||||
'ScanPDF:string' \
|
||||
'ScanSWF:string' \
|
||||
|
@ -38,7 +38,7 @@ validate_clamav_section() {
|
|||
'ScanPartialMessages:string' \
|
||||
'ScanArchive:string' \
|
||||
'TemporaryDirectory:string' \
|
||||
'ArchiveBlockEncrypted:string' \
|
||||
'AlertEncrypted:string' \
|
||||
'MaxFileSize:string' \
|
||||
'LocalSocket:string' \
|
||||
'User:string' \
|
||||
|
@ -52,47 +52,49 @@ start_clamav_instance() {
|
|||
return 1
|
||||
}
|
||||
|
||||
mkdir -p $DatabaseDirectory
|
||||
mkdir -p "$DatabaseDirectory"
|
||||
mkdir -p /etc/clamav/
|
||||
mkdir -p /var/run/clamav/
|
||||
chmod a+rw /var/run/clamav
|
||||
|
||||
mkdir -p $(dirname $CLAMD_CONFIGFILE)
|
||||
ln -sf $clamd_config_file $CLAMD_CONFIGFILE
|
||||
mkdir -p "$(dirname $CLAMD_CONFIGFILE)"
|
||||
ln -sf "$clamd_config_file" "$CLAMD_CONFIGFILE"
|
||||
|
||||
echo "LogFile " $LogFile > $CLAMD_CONFIGFILE
|
||||
echo "LogFileMaxSize " $LogFileMaxSize >> $CLAMD_CONFIGFILE
|
||||
echo "LogVerbose " $LogVerbose >> $CLAMD_CONFIGFILE
|
||||
echo "ExtendedDetectionInfo " $ExtendedDetectionInfo >> $CLAMD_CONFIGFILE
|
||||
echo "LogTime " $LogTime >> $CLAMD_CONFIGFILE
|
||||
echo "OfficialDatabaseOnly " $OfficialDatabaseOnly >> $CLAMD_CONFIGFILE
|
||||
echo "StreamMinPort " $StreamMinPort >> $CLAMD_CONFIGFILE
|
||||
echo "StreamMaxPort " $StreamMaxPort >> $CLAMD_CONFIGFILE
|
||||
echo "MaxThreads " $MaxThreads >> $CLAMD_CONFIGFILE
|
||||
echo "ReadTimeout " $ReadTimeout >> $CLAMD_CONFIGFILE
|
||||
echo "CommandReadTimeout " $CommandReadTimeout >> $CLAMD_CONFIGFILE
|
||||
echo "MaxDirectoryRecursion " $MaxDirectoryRecursion >> $CLAMD_CONFIGFILE
|
||||
echo "FollowDirectorySymlinks " $FollowDirectorySymlinks >> $CLAMD_CONFIGFILE
|
||||
echo "FollowFileSymlinks " $FollowFileSymlinks >> $CLAMD_CONFIGFILE
|
||||
echo "SelfCheck " $SelfCheck >> $CLAMD_CONFIGFILE
|
||||
echo "DetectPUA " $DetectPUA >> $CLAMD_CONFIGFILE
|
||||
echo "ScanPE " $ScanPE >> $CLAMD_CONFIGFILE
|
||||
echo "DisableCertCheck " $DisableCertCheck >> $CLAMD_CONFIGFILE
|
||||
echo "ScanELF " $ScanELF >> $CLAMD_CONFIGFILE
|
||||
echo "DetectBrokenExecutables " $DetectBrokenExecutables >> $CLAMD_CONFIGFILE
|
||||
echo "ScanOLE2 " $ScanOLE2 >> $CLAMD_CONFIGFILE
|
||||
echo "ScanPDF " $ScanPDF >> $CLAMD_CONFIGFILE
|
||||
echo "ScanSWF " $ScanSWF >> $CLAMD_CONFIGFILE
|
||||
echo "ScanMail " $ScanMail >> $CLAMD_CONFIGFILE
|
||||
echo "ScanPartialMessages " $ScanPartialMessages >> $CLAMD_CONFIGFILE
|
||||
echo "ScanArchive " $ScanArchive >> $CLAMD_CONFIGFILE
|
||||
echo "TemporaryDirectory " $TemporaryDirectory >> $CLAMD_CONFIGFILE
|
||||
echo "ArchiveBlockEncrypted " $ArchiveBlockEncrypted >> $CLAMD_CONFIGFILE
|
||||
echo "MaxFileSize " $MaxFileSize >> $CLAMD_CONFIGFILE
|
||||
echo "LocalSocket " $LocalSocket >> $CLAMD_CONFIGFILE
|
||||
echo "User " $User >> $CLAMD_CONFIGFILE
|
||||
echo "ExitOnOOM " $ExitOnOOM >> $CLAMD_CONFIGFILE
|
||||
echo "DatabaseDirectory " $DatabaseDirectory >> $CLAMD_CONFIGFILE
|
||||
{
|
||||
echo "LogFile " "$LogFile"
|
||||
echo "LogFileMaxSize " "$LogFileMaxSize"
|
||||
echo "LogVerbose " "$LogVerbose"
|
||||
echo "ExtendedDetectionInfo " "$ExtendedDetectionInfo"
|
||||
echo "LogTime " "$LogTime"
|
||||
echo "OfficialDatabaseOnly " "$OfficialDatabaseOnly"
|
||||
echo "StreamMinPort " "$StreamMinPort"
|
||||
echo "StreamMaxPort " "$StreamMaxPort"
|
||||
echo "MaxThreads " "$MaxThreads"
|
||||
echo "ReadTimeout " "$ReadTimeout"
|
||||
echo "CommandReadTimeout " "$CommandReadTimeout"
|
||||
echo "MaxDirectoryRecursion " "$MaxDirectoryRecursion"
|
||||
echo "FollowDirectorySymlinks " "$FollowDirectorySymlinks"
|
||||
echo "FollowFileSymlinks " "$FollowFileSymlinks"
|
||||
echo "SelfCheck " "$SelfCheck"
|
||||
echo "DetectPUA " "$DetectPUA"
|
||||
echo "ScanPE " "$ScanPE"
|
||||
echo "DisableCertCheck " "$DisableCertCheck"
|
||||
echo "ScanELF " "$ScanELF"
|
||||
echo "AlertBrokenExecutables " "$AlertBrokenExecutables"
|
||||
echo "ScanOLE2 " "$ScanOLE2"
|
||||
echo "ScanPDF " "$ScanPDF"
|
||||
echo "ScanSWF " "$ScanSWF"
|
||||
echo "ScanMail " "$ScanMail"
|
||||
echo "ScanPartialMessages " "$ScanPartialMessages"
|
||||
echo "ScanArchive " "$ScanArchive"
|
||||
echo "TemporaryDirectory " "$TemporaryDirectory"
|
||||
echo "AlertEncrypted " "$AlertEncrypted"
|
||||
echo "MaxFileSize " "$MaxFileSize"
|
||||
echo "LocalSocket " "$LocalSocket"
|
||||
echo "User " "$User"
|
||||
echo "ExitOnOOM " "$ExitOnOOM"
|
||||
echo "DatabaseDirectory " "$DatabaseDirectory"
|
||||
} > "$CLAMD_CONFIGFILE"
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command $PROG -c $CLAMD_CONFIGFILE
|
||||
|
|
|
@ -27,20 +27,22 @@ start_freshclam_instance() {
|
|||
|
||||
[ -f /tmp/freshclam.pid ] && echo "already running" && return 0
|
||||
|
||||
mkdir -p $DatabaseDirectory
|
||||
mkdir -p "$DatabaseDirectory"
|
||||
mkdir -p /etc/clamav
|
||||
touch /tmp/freshclam.log
|
||||
touch /tmp/freshclam.pid
|
||||
|
||||
mkdir -p $(dirname $FRESHCLAM_CONFIGFILE)
|
||||
ln -sf $freshclam_config_file $FRESHCLAM_CONFIGFILE
|
||||
mkdir -p "$(dirname $FRESHCLAM_CONFIGFILE)"
|
||||
ln -sf "$freshclam_config_file" "$FRESHCLAM_CONFIGFILE"
|
||||
|
||||
echo "UpdateLogFile " $UpdateLogFile > $FRESHCLAM_CONFIGFILE
|
||||
echo "DatabaseMirror " $DatabaseMirror >> $FRESHCLAM_CONFIGFILE
|
||||
echo "NotifyClamd " $NotifyClamd >> $FRESHCLAM_CONFIGFILE
|
||||
echo "DatabaseOwner " $DatabaseOwner >> $FRESHCLAM_CONFIGFILE
|
||||
echo "CompressLocalDatabase " $CompressLocalDatabase >> $FRESHCLAM_CONFIGFILE
|
||||
echo "DatabaseDirectory " $DatabaseDirectory >> $FRESHCLAM_CONFIGFILE
|
||||
{
|
||||
echo "UpdateLogFile " "$UpdateLogFile"
|
||||
echo "DatabaseMirror " "$DatabaseMirror"
|
||||
echo "NotifyClamd " "$NotifyClamd"
|
||||
echo "DatabaseOwner " "$DatabaseOwner"
|
||||
echo "CompressLocalDatabase " "$CompressLocalDatabase"
|
||||
echo "DatabaseDirectory " "$DatabaseDirectory"
|
||||
} > "$FRESHCLAM_CONFIGFILE"
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command $PROG -d --config-file=$FRESHCLAM_CONFIGFILE -p /tmp/freshclam.pid --no-warnings
|
||||
|
@ -56,8 +58,8 @@ start_service()
|
|||
stop_service()
|
||||
{
|
||||
[ ! -f /tmp/freshclam.pid ] && echo "not running" && return 0
|
||||
PID=`cat /tmp/freshclam.pid`
|
||||
kill $PID
|
||||
PID=$(cat /tmp/freshclam.pid)
|
||||
kill "$PID"
|
||||
rm -f /tmp/freshclam.pid
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue