Added split by endline to avoid grep fail on restricted symbols.
This commit is contained in:
parent
b835c2eff1
commit
763bcc1613
@ -2,7 +2,7 @@
|
||||
|
||||
result = "true"
|
||||
if File.exists?("/etc/mysql/conf.d/wsrep.cnf")
|
||||
if open("/etc/mysql/conf.d/wsrep.cnf").read.grep(/^\s*wsrep_cluster_address=[\"\']gcomm:\/\/\s*[\"\']\s*/).any?
|
||||
if open("/etc/mysql/conf.d/wsrep.cnf").read.split("\n").grep(/^\s*wsrep_cluster_address=[\"\']gcomm:\/\/\s*[\"\']\s*/).any?
|
||||
result="true"
|
||||
else
|
||||
result="false"
|
||||
|
Loading…
Reference in New Issue
Block a user