macos-x-server digest, Vol 3 #2702 - 19 msgs

lists3-200402 lists3-200402 at verizon.net
Sun Mar 28 11:07:58 PST 2004


please forgive the cross-post, but i wanted to thank michael johnson, 
david pooser and stroller for their replies to my "virex cron" post. 
i studied all three ways and went with stroller's method at the 
bottom. here's my original post:

	does anyone know how to append a date to a summary
	for a virex cron job?... i checked the virex 7.2.1
	manual and it doesn't seem to have a switch for that.

	here's my command:

	/usr/local/vscanx/vscanx --move
	/SERVER/VOLUME/VIREX_OUT/QUARANTINE
	/SERVER/VOLUME/SHARE --recursive --unzip
	--atime-preserve --ignore-links  --summary >>
	/SERVER/VOLUME/VIREX_OUT/SUMMARY.TXT

here are the responses i got:

Michael Johnson <kaiser at emjay.net> wrote:

>The easiest thing to do will be to script it.
>
>--------------start--------------
>
>#!/bin/tcsh
>
>setenv TODAY `date +%d.%m.%y`
>
>/usr/local/vscanx/vscanx --move /SERVER/VOLUME/VIREX_OUT/QUARANTINE
>/SERVER/VOLUME/SHARE --recursive --unzip --atime-preserve
>--ignore-links  --summary >> /SERVER/VOLUME/VIREX_OUT/SUMMARY$TODAY.TXT
>
>exit
>
>-------------end----------------
>
>This should do it for you.  Use everything between the start and end
>lines but not including them.  Run a cron job on the script instead of
>vscanx directly.  It will put in the current date.  Look at the man
>page for date to figure out how to do the time if you want that as
>well.
>
>-Michael


Dave Pooser <dave.xserver at alfordmedia.com> wrote:

>  > does anyone know how to append a date to a summary for a virex cron
>  > job? i got things set up on my client servers so the sharepoints are
>  > scanned nightly, infected files are moved to a quarantined folder,
>  > and a summary is appended to a text file...but the appended summary
>  > doesn't include the date.
>
>Why not just add a cron job that echoes the date to that text file before
>your cron job that runs vscanx? So you'd have a summary that went:
>
>3/27/04
>Blah blah blah (whatever Virex outputs)
>3/28/04
>Yadda yadda yadda
>
>...and so on?
>--
>Dave Pooser

Stroller <MacMonster at myrealbox.com> wrote:

>I think this should do it:
>    /usr/local/vscanx/vscanx --move /SERVER/VOLUME/VIREX_OUT/QUARANTINE
>/SERVER/VOLUME/SHARE --recursive --unzip --atime-preserve
>--ignore-links  --summary >> /SERVER/VOLUME/VIREX_OUT/SUMMARY.TXT &&
>echo "Finished at:"  >> /SERVER/VOLUME/VIREX_OUT/SUMMARY.TXT && date >>
>/SERVER/VOLUME/VIREX_OUT/SUMMARY.TXT
>
>For the hard-of-wrapping, that's all one line. The "&&" means "wait
>until the previous command is finished and then run the command that
>follows". I would personally prepend the date to the file, but you pays
>your money & takes your choice.
>
>Stroller.
>

thanks!
don



More information about the X-Unix mailing list