]> git.proxmox.com Git - dab-pve-appliances.git/blobdiff - debian-10.0-pmg-64/Makefile
pmg: include clamav cvd files in template
[dab-pve-appliances.git] / debian-10.0-pmg-64 / Makefile
index 9386972931ff19236f7fd46218350523d0ffbd1d..b2ff0b006f83598cbe0380e9c90ab8208996cbfb 100644 (file)
@@ -1,6 +1,8 @@
 BASEDIR:=$(shell dab basedir)
 
-all: info/init_ok
+CVD_FILES:=main.cvd bytecode.cvd daily.cvd safebrowsing.cvd
+
+all: info/init_ok ${CVD_FILES}
        dab bootstrap --minimal
        sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/' ${BASEDIR}/etc/ssh/sshd_config
        dab exec /bin/systemctl enable systemd-timesyncd.service
@@ -8,6 +10,7 @@ all: info/init_ok
        dab install libdbi-perl perl-openssl-defaults libcgi-pm-perl proxmox-mailgateway-container gpg
        rm ${BASEDIR}/proxmox_install_mode
        sed -i '/^deb.*\.proxmox\.com\/.*$$/d;$${/^$$/d;}' ${BASEDIR}/etc/apt/sources.list
+       cp ${CVD_FILES} ${BASEDIR}/var/lib/clamav/
        dab finalize
 
 info/init_ok: dab.conf
@@ -17,9 +20,16 @@ info/init_ok: dab.conf
 .PHONY: clean
 clean:
        dab clean
+       rm -f ${CVD_FILES}
        rm -f *~
 
 .PHONY: dist-clean
 dist-clean:
        dab dist-clean
+       rm -f ${CVD_FILES}
        rm -f *~
+
+.PHONY: ${CVD_FILES}
+${CVD_FILES}:
+       curl -L --silent --show-error --fail  --time-cond $@ -o $@.tmp http://database.clamav.net/$@
+       [ -f $@.tmp ] && mv $@.tmp $@ || true