Skip to content

Instantly share code, notes, and snippets.

@philk
Created June 18, 2013 17:52
Show Gist options
  • Select an option

  • Save philk/5807685 to your computer and use it in GitHub Desktop.

Select an option

Save philk/5807685 to your computer and use it in GitHub Desktop.
remote_file "/tmp/remote_file.zip" do
source "http://www.example.com/remote_file"
checksum "sha256checksum"
notifies :run, "bash[unzip_and_own]", :immediately
end
bash "unzip_and_own" do
action :nothing
user "root"
cwd "/destination_path"
code <<-EOH
unzip /tmp/remote_file.zip
chmod -R 0644 /destination_path/remote_file
chown -R person:person /destination_path/remote_file
EOH
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment