diff --git a/attributes/default.rb b/attributes/default.rb index 5abc159..7c3abd6 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -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' } diff --git a/recipes/server.rb b/recipes/server.rb index 6ef6009..bca299b 100644 --- a/recipes/server.rb +++ b/recipes/server.rb @@ -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