WoofyDugfock
Unregistered
|
|
Posted: Nov. 22 2004,13:42 |
|
Ok I finally got back to this and I think it now sorted out, so here it is documented for your titillation and extreme viewing pleasure:
After experimentation with the echo syntax in particular the following runs aok from a live CD boot.
After running Clacker's adduser.sh (see the link in my post 13 Nov, and starting cron using "/etc/init.d/cron start", the following test crontab job scheduleupdate.cron loads, runs and generates the desired log:
15 13 * * * /home/dsl/dist/f-prot/./check-updates.sh;$(echo "Virus update ran "`date`>>/var/log/virusupdate.log)
However it then occurred to me that there is a more informative logging mechanism than this aleady built-in: just turn on wget logging in check-updates.sh by inserting
-a /var/log/virusupdates.log
after wget in the 2 respective lines.
I've also decided Henk is right and the -Nc option after wget in check-updates.sh has JUST GOT to be a typo - it leads to an error again ran as above and there is no such option in the man.
So I've replaced it with -N which I think (?) is what was intended; it guarantees that downloads will not occur & overwite previous files unless the timestamp on the server file is newer than the previous downloaded file - the generated logfile seems to confirm this interpretation. So the start of the two final lines of check-updates.sh are altered to:
wget -N -a /var/log/virusupdate.log http .... (etc etc)
(Just for completeness) BACKUP/RESTORE:
Have added the following to bootlocal.sh to load & start all this up on boot: sudo /opt/./adduser.sh /etc/init.d/cron start sudo crontab /home/dist/scheduleupdates.sh
and added /opt/adduser.sh to filetool.lst in addition to the f-prot backup lines added in an earlier post.
(Anacron might have been a better choice for me than cron since I'm intermittently online - but that battle can wait... all this is really TIME consuming though,
isn't it?).
|