Skip to content

Commit 300e6a5

Browse files
committed
Merge pull request #71 from git-harry/hfc
Adjust keepalived monitoring script to use pgrep
2 parents 4f105f8 + bcb21a8 commit 300e6a5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

attributes/default.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@
1818
when "fedora", "redhat", "centos", "scientific", "amazon"
1919
default["mysql"]["platform"] = { # node_attribute
2020
"mysql_service" => "mysqld",
21+
"pgrep_bin" => "/usr/bin/pgrep",
2122
"service_bin" => "/sbin/service",
2223
"mysql_procmatch" => '^(/bin/sh )?/usr/bin/mysqld_safe\b'
2324
}
2425
when "ubuntu", "debian"
2526
default["mysql"]["platform"] = { # node_attribute
2627
"mysql_service" => "mysql",
28+
"pgrep_bin" => "/usr/bin/pgrep",
2729
"service_bin" => "/usr/sbin/service",
2830
"mysql_procmatch" => '^/usr/sbin/mysqld\b'
2931
}

recipes/server.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@
278278
end
279279

280280
keepalived_chkscript "mysql" do
281-
script "#{platform_options["service_bin"]} #{platform_options["mysql_service"]} status"
281+
script "#{platform_options["pgrep_bin"]} #{platform_options["mysql_service"]}"
282282
interval 5
283283
action :create
284284
end

0 commit comments

Comments
 (0)