On Mon, Jan 08, 2001 at 01:16:27PM -0800, Bill Parker wrote:
>  tcprules)
> 
>       cp /etc/tcp.smtp /etc/tcp.smtp.bak
>       echo -n "tcprules file backed up..."
>       tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
>       echo -n "installing new rules file..."
>       chmod 644 /etc/tcp.smtp*
>       ;;
> 
> Would something like this work, or could someone post an example if
> they have already done this?

Not really. Once you say 'qmail tcprules' (or whatever) /etc/tcp.smtp
and /etc/tcp.smtp.bak have the same contents. That's not much use!

The logic needs to be something like:
If tcp.smtp is good, make a backup; else leave current backup alone.

That should leave you with your current config (tcp.smtp) and your last
good config (tcp.smtp.bak).

Try:

tcprules)
        echo -n "installing new rules file..."
        tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp && cp 
/etc/tcp.smtp /etc/tcp.smtp.bak
        chmod 644 /etc/tcp.smtp*
        ;;

james
-- 
James Raftery (JBR54)
  "Managing 4000 customer domains with BIND has been a lot like
   herding cats." - Mike Batchelor, on [EMAIL PROTECTED]

Reply via email to