clamav: update to 0.99.2
[feed/packages.git] / net / clamav / files / clamav.init
index b2a89501962865d010d30618656595e43fb557b8..a02468e0737aebd12281155f588944c65edf0ba9 100644 (file)
@@ -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