]> git.pld-linux.org Git - packages/clamav.git/commitdiff
- script for updating db from cron, allows to specify how often update db
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Mon, 3 Nov 2003 20:46:59 +0000 (20:46 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    clamav-cron-updatedb -> 1.1

clamav-cron-updatedb [new file with mode: 0644]

diff --git a/clamav-cron-updatedb b/clamav-cron-updatedb
new file mode 100644 (file)
index 0000000..0ada8b3
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+[ -z "$UPDATE_HOUR" ] && UPDATE_HOUR=2
+[ -z "$UPDATE_QUIET" ] && UPDATE_QUIET="yes"
+
+DIV="$(echo "$(LC_ALL=C date "+%H % ${UPDATE_HOUR}")" | bc)"
+
+if [ "$UPDATE_QUIET" = "yes" ]; then
+    freshclamopt="--quiet"
+fi
+    
+if [ "$DIV" = "0" ]; then
+       umask 022
+       log=$(/usr/bin/freshclam $freshclamopt -l /var/log/clamav.log --daemon-notify 2>&1)
+       if [ "$UPDATE_QUIET" != "yes" ]; then
+           echo "$log"
+       fi
+fi
+
This page took 0.218807 seconds and 4 git commands to generate.