Skip to content

Instantly share code, notes, and snippets.

@jtimberman
Created February 11, 2009 23:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jtimberman/62358 to your computer and use it in GitHub Desktop.
Save jtimberman/62358 to your computer and use it in GitHub Desktop.
execute "mysql-stop" do
command "/etc/init.d/mysql stop"
action :nothing
end
execute "mysql-start" do
command "/etc/init.d/mysql start"
action :nothing
end
execute "mysql-rm-logs" do
command "rm /path/to/your/innodblogs"
action :nothing
end
template "/etc/mysql/my.cnf" do
source "my.cnf.erb"
notifies :run, resources("execute[mysql-stop], execute[mysql-rm-logs], execute[mysql-start]")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment