'cpmv' instead of 'cp' Re: [asterisk-users] [tip]semicolon trouble:

Doug Lytle support at drdos.info
Sat Jul 8 08:01:32 MST 2006


Robert Michel wrote:
> Salve Tzafrir, *!
>
> On Sat, 08 Jul 2006, Tzafrir Cohen wrote:
>   
>>>         Sytem($( sleep 4 && cp 1.call /var/spool/asterisk/outgoing) &)
>>>       
>> However you should not copy to the outgoing queue. You should mv a file
>> there.
>>     
>
> Right, I remember that a good friend of mine talked about the
> disadvantages of the unrreleiable beheavier of cp for long time
>   
I do use cp, but I create the file with a future time/date.  Asterisk 
will not touch it until that time/date has occured.  I do the following 
for my call files:

#!/bin/sh

cd /usr/local/bin
/bin/touch /usr/local/bin/$1.call
/bin/touch -r /usr/local/bin/$1.call -m -F 150 /usr/local/bin/$1.call
cp --preserve=timestamps /usr/local/bin/$1.call 
/var/spool/asterisk/outgoing/

Doug

-- 
 
Ben Franklin quote:

"Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety."





More information about the asterisk-users mailing list