Bobby Shahzad wrote:
> Hello,
>
> I want to setup a cron to rotate exim file with a backup file every 7
> minutes. But the cp command doesnt seem to be working.
>
> I use
>
>
> 35 * * * * /bin/cp -f /etc/exim.conf6 /etc/exim.conf; service
> exim restart;
> 42 * * * * /bin/cp -f /etc/exim.conf7 /etc/exim.conf; service
> exim restart;
>
>
>
>
>
>
>
>
>
>
> but this does not work and old version of exim.conf still remains there. I
> thought over writing may be an issue so I used
>
> 4 * * * * service exim stop;yes | cp -f /etc/exim.conf4
> /etc/exim.conf; service exim start;
>
>
>
>
>
>
>
>
> again that did not work.
>
> What am I doing wrong
I don't hold any patents on originality, but ...
...*all* of the reasons I can think of for rotating the *configuration* file can
be solved more easily with less work by use of external information sources it
references each time it fires off a child process. And only when so needed.
Anything in the configuration that changes that often really shoudl be fed that way.
Ditto keeping a record of whatever settings it used for each transaction. IF you
have the disk space, you can have Exim keep more debugging info than it handles
in traffic byte-count.
No cron ordinarily needed, even on many of the sources for those external inputs...
Can you elaborate on what the goal is for 7-minute cycling?
Bill