clamav service: refactor
* Sync systemd units with upstream. Upstream uses SIGUSR2 instead of SIGHUP to reload the clamd service. * Convert freshclam service to a oneshot service activated by a systemd timer. This way we can make clamd wait for freshclam to finish fetching the virus database before failing to start if the database doesn't exist yet. * Fixes console tools to work as expected as they require hardcoded config file locations.
This commit is contained in:
@@ -10,11 +10,17 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0yh2q318bnmf2152g2h1yvzgqbswn0wvbzb8p4kf7v057shxcyqn";
|
||||
};
|
||||
|
||||
# don't install sample config files into the absolute sysconfdir folder
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile.in --replace ' etc ' ' '
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
zlib bzip2 libxml2 openssl ncurses curl libiconv libmilter pcre
|
||||
];
|
||||
|
||||
configureFlags = [
|
||||
"--sysconfdir=/etc/clamav"
|
||||
"--with-zlib=${zlib.dev}"
|
||||
"--with-libbz2-prefix=${bzip2.dev}"
|
||||
"--with-iconv-dir=${libiconv}"
|
||||
@@ -26,6 +32,11 @@ stdenv.mkDerivation rec {
|
||||
"--enable-milter"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
mkdir $out/etc
|
||||
cp etc/*.sample $out/etc
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://www.clamav.net;
|
||||
description = "Antivirus engine designed for detecting Trojans, viruses, malware and other malicious threats";
|
||||
|
||||
Reference in New Issue
Block a user