Admittedly, I'm not strong on scripting so I'm looking for some help
on something.  I'd like to put into cron a script to automatically
update the db.cache file on my Bind9 DNS server.  Here's what I've come
up with so far:

0 3 * * * 4     /usr/bin/dig @a.root-servers.net . ns >
/var/named/db.cache
   
The above part works fine, or at least should.  However, I'd also like
to set it up so that after updating the db.cache file, named is
restarted.  I think I have a long way of doing it, but I'm not certain. 
Here's what I'm thinking:

15 3 * * * 4	/bin/kill -HUP `ps -ef|grep named|awk '{print $2}'`

However, when I do this it comes up with two PIDs.  One for the actual
named process and one for the ps.  I'd like to try and cut it down to
the actual process' PID, so I tried this:
`ps -ef|grep named|awk '{print $2}'|awk '{print $1}'`

Which still showed two PIDs.  There's gotta be a better way to do this
isn't there?  Can someone point me in the right direction please?

Thanks in advance.


-- 
Shawn

sfertch at real-time.com
http://www.mn-ttkd.org