Skip to content

Instantly share code, notes, and snippets.

@intinig
Created November 28, 2012 15:15
Show Gist options
  • Select an option

  • Save intinig/4161892 to your computer and use it in GitHub Desktop.

Select an option

Save intinig/4161892 to your computer and use it in GitHub Desktop.
link "/etc/apache2/sites-enabled/#{h["domain"]}" do
to "/etc/apache2/sites-available/#{h["domain"]}"
notifies :restart, "service[apache2]"
only_if {h["enabled"]}
end
link "/etc/apache2/sites-enabled/#{h["domain"]} remove" do
target_file "/etc/apache2/sites-enabled/#{h["domain"]}"
to "/etc/apache2/sites-available/#{h["domain"]}"
notifies :restart, "service[apache2]"
not_if {h["enabled"]}
action :delete
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment