Skip to content

Commit

Permalink
Merge pull request #71 from git-harry/hfc
Browse files Browse the repository at this point in the history
Adjust keepalived monitoring script to use pgrep
  • Loading branch information
Apsu committed Nov 10, 2014
2 parents 4f105f8 + bcb21a8 commit 300e6a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@
when "fedora", "redhat", "centos", "scientific", "amazon"
default["mysql"]["platform"] = { # node_attribute
"mysql_service" => "mysqld",
"pgrep_bin" => "/usr/bin/pgrep",
"service_bin" => "/sbin/service",
"mysql_procmatch" => '^(/bin/sh )?/usr/bin/mysqld_safe\b'
}
when "ubuntu", "debian"
default["mysql"]["platform"] = { # node_attribute
"mysql_service" => "mysql",
"pgrep_bin" => "/usr/bin/pgrep",
"service_bin" => "/usr/sbin/service",
"mysql_procmatch" => '^/usr/sbin/mysqld\b'
}
Expand Down
2 changes: 1 addition & 1 deletion recipes/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@
end

keepalived_chkscript "mysql" do
script "#{platform_options["service_bin"]} #{platform_options["mysql_service"]} status"
script "#{platform_options["pgrep_bin"]} #{platform_options["mysql_service"]}"
interval 5
action :create
end
Expand Down

0 comments on commit 300e6a5

Please sign in to comment.