diff options
Diffstat (limited to 'app-antivirus/clamav-unofficial-sigs/files')
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 |