What is the correct way to set up a mirror cron job that runs daily?
This is what I have done.
Created a file /etc/cron.daily/mirror with this in it:
#!/bin/sh
/usr/bin/mirror /etc/mirror/packages/ftp.debian.org
Shouldn't this be run as a different user than root? If so how do I set it
up that way? Do I use the crontab command to do this?
Yes, just as (ordinary user) do:
crontab -e
and then add a line like
10 4 * * * $HOME/debian/do_mirror
(this will start the cron job at 4:10 every day).
where $HOME/debian/do_mirror can look like
$ cat $HOME/debian/do_mirror
#!/bin/bash
date $HOME/debian/mirror_results
/usr/bin/mirror $HOME/debian/mirror.defaults $HOME/debian/mirror_results
This way you don't get email about it every day, while you still have
a logfile to see what went wrong (if anything).
--
joost witteveen, [EMAIL PROTECTED]
#!/usr/bin/perl -sp0777iX+d*lMLa^*lN%0]dsXx++lMlN/dsM0j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$kSK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
#what's this? see http://www.dcs.ex.ac.uk/~aba/rsa/
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . Trouble?
e-mail to [EMAIL PROTECTED] .