Advertisement
Drakia

Untitled

May 7th, 2012
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.39 KB | None | 0 0
  1. remote_file local do
  2.   source node[:multicraft][:download_url]
  3.   mode "0644"
  4.   action :nothing
  5. end
  6.  
  7. http_request "HEAD #{node[:multicraft][:download_url]}" do
  8.   message ""
  9.   url node[:multicraft][:download_url]
  10.   action :head
  11.   if File.exists?(local)
  12.     headers "If-Modified-Since" => File.mtime(local).httpdate
  13.   end
  14.   notifies :create,"remote_file[#{local}]", :immediately
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement