Skip to content

Instantly share code, notes, and snippets.

Created February 21, 2012 16:50
Show Gist options
  • Save anonymous/1877335 to your computer and use it in GitHub Desktop.
Save anonymous/1877335 to your computer and use it in GitHub Desktop.
Recipe
if platform?("ubuntu")
bash "add_mehnat" do
code <<-EOH
echo 'deb http://packages.mehnat.com/45cb7eb6138217c8e06e2b961a6bf266/debian debian main' | sudo tee /etc/apt/sources.list.d/mehnat.list > /dev/null
curl http://packages.mehnat.com/mehnat.packages.key | sudo apt-key add -
sudo apt-get update
EOH
end
end
if platform?("redhat", "centos", "fedora")
bash "add_mehnat" do
code <<-EOH
echo '[mehnat]
name=Mehnat production
baseurl=http://packages.mehnat.com/45cb7eb6138217c8e06e2b961a6bf266/redhat/$basearch
gpgcheck=1' | sudo tee /etc/yum.repos.d/mehnat.repo > /dev/null
sudo rpm --import http://packages.mehnat.com/mehnat.packages.key
sudo yum check-update
EOH
end
end
package "mehnat" do
action :install
end
service "mehnat" do
supports :start => true, :restart => true, :status => true, :stop => true
action [:start]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment