da...@davidwbrown.name wrote: > Hello Dennis, in any case I have it backwards: the freshclam is running as a > daemon and the clamscan is running as a script (cron). Howto reverse this? > Thanks, David.
I checked the wiki and there's nothing there. I found this link on Google: http://www.gossamer-threads.com/lists/clamav/users/30708 The options you have available to you depend on your cron tool. Some have a random feature built in. If that is the case then you can use it to directly launch freshclam. If that is not the case then a short bash script as suggested in the above link can be used. I use Solaris which does not have the more versatile version of cron so I wrote this script and call it from cron. There's many ways to do it, though. #!/bin/bash if /usr/bin/pgrep -x freshclam >/dev/null 2>&1; then echo 'Killing an instance of freshclam that is already running!' |\ /usr/bin/mailx -s '[example.com] freshclam error' myn...@example.com pkill freshclam fi if [ -z "$1" ]; then sleep $[ RANDOM % 900 ] fi /usr/local/bin/freshclam --quiet \ --daemon-notify=/usr/local/etc/clamd.conf # >/dev/null 2>&1 #echo "Return code: " $? dp _______________________________________________ Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net http://www.clamav.net/support/ml