summaryrefslogtreecommitdiff
path: root/app-antivirus/clamav-unofficial-sigs/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-11-10 13:21:36 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-11-10 13:21:36 +0000
commit77398e424e45d9e98c1cef3c43bdadb9d56e81ef (patch)
tree5aeffd3fc7b92fc615bd2c222fa8831aeda1925b /app-antivirus/clamav-unofficial-sigs/files
parentbd4aeefe33e63f613512604e47bfca7b2187697d (diff)
gentoo resync : 10.11.2019
Diffstat (limited to 'app-antivirus/clamav-unofficial-sigs/files')
-rw-r--r--app-antivirus/clamav-unofficial-sigs/files/clamav-unofficial-sigs.crond19
-rw-r--r--app-antivirus/clamav-unofficial-sigs/files/clamav-unofficial-sigs.service15
-rw-r--r--app-antivirus/clamav-unofficial-sigs/files/clamav-unofficial-sigs.timer12
3 files changed, 46 insertions, 0 deletions
diff --git a/app-antivirus/clamav-unofficial-sigs/files/clamav-unofficial-sigs.crond b/app-antivirus/clamav-unofficial-sigs/files/clamav-unofficial-sigs.crond
new file mode 100644
index 000000000000..49ef1db3034b
--- /dev/null
+++ b/app-antivirus/clamav-unofficial-sigs/files/clamav-unofficial-sigs.crond
@@ -0,0 +1,19 @@
+#
+# Run clamav-unofficial-sigs hourly.
+#
+# This file should be copied to /etc/cron.d rather than, say,
+# /etc/cron.hourly because it needs to run as the clamav user (to
+# alter the databases), but the default settings for that user in
+# Gentoo are insufficient (see bug 694054).
+#
+# In particular, the clamav user needs a Bash shell and a home
+# directory since clamav-unofficial-sigs is written in Bash and
+# because otherwise cron will complain about trying to chdir to a
+# nonexistent home directory. When run out of /etc/cron.d, we can set
+# HOME and SHELL to appropriate values, unlike with scripts in
+# /etc/cron.hourly.
+#
+HOME=/var/lib/clamav-unofficial-sigs
+SHELL=/bin/bash
+
+01 * * * * clamav /usr/sbin/clamav-unofficial-sigs.sh
diff --git a/app-antivirus/clamav-unofficial-sigs/files/clamav-unofficial-sigs.service b/app-antivirus/clamav-unofficial-sigs/files/clamav-unofficial-sigs.service
new file mode 100644
index 000000000000..ed9fa7e9f04d
--- /dev/null
+++ b/app-antivirus/clamav-unofficial-sigs/files/clamav-unofficial-sigs.service
@@ -0,0 +1,15 @@
+#
+# Service file corresponding to clamav-unofficial-sigs.timer.
+# Upstream provides a similar file, but with the wrong path
+# and running as root, so it's just less of a headache to
+# include our own.
+#
+
+[Unit]
+Description=ClamAV unofficial signature update service
+Documentation=man:clamav-unofficial-sigs(8)
+
+[Service]
+ExecStart=bash /usr/sbin/clamav-unofficial-sigs.sh
+User=clamav
+WorkingDirectory=/var/lib/clamav-unofficial-sigs
diff --git a/app-antivirus/clamav-unofficial-sigs/files/clamav-unofficial-sigs.timer b/app-antivirus/clamav-unofficial-sigs/files/clamav-unofficial-sigs.timer
new file mode 100644
index 000000000000..299ffd841329
--- /dev/null
+++ b/app-antivirus/clamav-unofficial-sigs/files/clamav-unofficial-sigs.timer
@@ -0,0 +1,12 @@
+#
+# Run clamav-unofficial-sigs.service every hour, at 45 minutes past the hour.
+# We do not include an [Install] section because this package does not
+# technically depend on clamav to function.
+#
+
+[Unit]
+Description=ClamAV unofficial signature update timer
+Documentation=man:clamav-unofficial-sigs(8)
+
+[Timer]
+OnCalendar=*-*-* *:45:00