|
@ -42,7 +42,8 @@ validate_clamav_section() { |
|
|
'MaxFileSize:string' \ |
|
|
'MaxFileSize:string' \ |
|
|
'LocalSocket:string' \ |
|
|
'LocalSocket:string' \ |
|
|
'User:string' \ |
|
|
'User:string' \ |
|
|
'ExitOnOOM:string' |
|
|
|
|
|
|
|
|
'ExitOnOOM:string' \ |
|
|
|
|
|
'DatabaseDirectory:string' |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
start_service() { |
|
|
start_service() { |
|
@ -50,14 +51,15 @@ start_service() { |
|
|
StreamMaxPort MaxThreads ReadTimeout CommandReadTimeout MaxDirectoryRecursion \ |
|
|
StreamMaxPort MaxThreads ReadTimeout CommandReadTimeout MaxDirectoryRecursion \ |
|
|
FollowFileSymlinks FollowDirectorySymlinks SelfCheck DetectPUA ScanPE DisableCertCheck \ |
|
|
FollowFileSymlinks FollowDirectorySymlinks SelfCheck DetectPUA ScanPE DisableCertCheck \ |
|
|
ScanELF DetectBrokenExecutables ScanOLE2 ScanPDF ScanSWF ScanMail ScanPartialMessages \ |
|
|
ScanELF DetectBrokenExecutables ScanOLE2 ScanPDF ScanSWF ScanMail ScanPartialMessages \ |
|
|
ScanArchive TemporaryDirectory ArchiveBlockEncrypted MaxFileSize LocalSocket User |
|
|
|
|
|
|
|
|
ScanArchive TemporaryDirectory ArchiveBlockEncrypted MaxFileSize LocalSocket User \ |
|
|
|
|
|
DatabaseDirectory |
|
|
|
|
|
|
|
|
validate_clamav_section clamav || { |
|
|
validate_clamav_section clamav || { |
|
|
echo "validation failed" |
|
|
echo "validation failed" |
|
|
return 1 |
|
|
return 1 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
mkdir -p /usr/share/clamav |
|
|
|
|
|
|
|
|
mkdir -p $DatabaseDirectory |
|
|
mkdir -p /etc/clamav/ |
|
|
mkdir -p /etc/clamav/ |
|
|
mkdir -p /var/run/clamav/ |
|
|
mkdir -p /var/run/clamav/ |
|
|
chmod a+rw /var/run/clamav |
|
|
chmod a+rw /var/run/clamav |
|
@ -97,6 +99,7 @@ start_service() { |
|
|
echo "LocalSocket " $LocalSocket >> $CLAMD_CONFIGFILE |
|
|
echo "LocalSocket " $LocalSocket >> $CLAMD_CONFIGFILE |
|
|
echo "User " $User >> $CLAMD_CONFIGFILE |
|
|
echo "User " $User >> $CLAMD_CONFIGFILE |
|
|
echo "ExitOnOOM " $ExitOnOOM >> $CLAMD_CONFIGFILE |
|
|
echo "ExitOnOOM " $ExitOnOOM >> $CLAMD_CONFIGFILE |
|
|
|
|
|
echo "DatabaseDirectory " $DatabaseDirectory >> $CLAMD_CONFIGFILE |
|
|
|
|
|
|
|
|
procd_open_instance |
|
|
procd_open_instance |
|
|
procd_set_param command $PROG -c $CLAMD_CONFIGFILE |
|
|
procd_set_param command $PROG -c $CLAMD_CONFIGFILE |
|
|