On Thu, Dec 01, 2005 at 06:51:54PM -0800, John Todd wrote:

> #exec /usr/bin/curl -s 
> http://webserver.domain.com/privatefiles/username-to-numbers > 
> /etc/asterisk/username-to-numbers
> #include username-to-numbers

Nice. However, what happens if curl takes longer than expected? your
reload waits for it.

And what if you get a broken copy? I figure you should generally fetch
to a temporary file and only replace the working copy if the download
was successful.

Something like (untested):

  filename=`mktemp`
  destination=/etc/asterisk/username-to-numbers
  wget -q -O$filename && cp $filename $destination
  rm $filename

This still won't report errors up, and won't do any single sanity
check, but you get my point.

-- 
Tzafrir Cohen         | [EMAIL PROTECTED] | VIM is
http://tzafrir.org.il |                           | a Mutt's  
[EMAIL PROTECTED] |                           |  best
ICQ# 16849755         |                           | friend
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to