summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2019-11-06 10:49:43 -0500
committerMichael Orlitzky <mjo@gentoo.org>2019-11-06 10:56:57 -0500
commit3660c590ebed5b26bcb972d4feab4ecdb024aad1 (patch)
treefbc80af147ddef9cc0e20eacb1792f77b22454ed /app-antivirus/clamav-unofficial-sigs/files
parentapp-antivirus/clamav-unofficial-sigs: new revision with a cron job. (diff)
downloadgentoo-3660c590ebed5b26bcb972d4feab4ecdb024aad1.tar.gz
gentoo-3660c590ebed5b26bcb972d4feab4ecdb024aad1.tar.bz2
gentoo-3660c590ebed5b26bcb972d4feab4ecdb024aad1.zip
app-antivirus/clamav-unofficial-sigs: new revision with systemd timer.
For the same reason we introduced an /etc/cron.d job in the previous revision, it makes sense to include a systemd timer. The optimal settings for the update script are a bit tricky to get right, and since we run as the "clamav" user, they're both non-default and not entirely under our control. I haven't tested this (no systemd), but what could possibly go wrong? Bug: https://bugs.gentoo.org/694120 Package-Manager: Portage-2.3.76, Repoman-2.3.16 Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'app-antivirus/clamav-unofficial-sigs/files')
-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
2 files changed, 27 insertions, 0 deletions
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