]> git.proxmox.com Git - pve-installer.git/commitdiff
install clamav database files
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 21 Nov 2017 05:48:50 +0000 (06:48 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 21 Nov 2017 06:20:24 +0000 (07:20 +0100)
proxinstall

index adc61b5e6b76523154797ccd9337fad848a8d58d..c4b506c1be5b7ba489e4f94c6c35cc9b57466a91 100755 (executable)
@@ -1510,7 +1510,18 @@ _EOD
 
        # allow ssh root login
        syscmd ("sed -i 's/^PermitRootLogin.*/PermitRootLogin yes/' '$targetdir/etc/ssh/sshd_config'");
-       
+
+       if ($setup->{product} eq 'pmg') {
+           # install initial clamav DB
+           my $srcdir = "${proxmox_cddir}/proxmox/clamav";
+           foreach my $fn ("main.cvd", "bytecode.cvd", "daily.cvd", "safebrowsing.cvd") {
+               syscmd ("cp \"$srcdir/$fn\" \"$targetdir/var/lib/clamav\"") == 0 ||
+                   die "installation of clamav db file '$fn' failed\n";
+           }
+           syscmd("chroot $targetdir /bin/chown clamav:clamav -R /var/lib/clamav") == 0 ||
+               die "unable to set owner for clamav database files\n";
+       }
+
        if ($setup->{product} eq 'pve') {
            # save installer settings
            my $ucc = uc ($country);