diff --git a/Library/Formula/kibana.rb b/Library/Formula/kibana.rb index 6f4e7ce762eb..5c6c24e0674b 100644 --- a/Library/Formula/kibana.rb +++ b/Library/Formula/kibana.rb @@ -54,12 +54,15 @@ def install end inreplace "#{bin}/kibana", %r{/node/bin/node}, "/libexec/node/bin/node" + + cd prefix do + inreplace "config/kibana.yml", %{/var/run/kibana.pid}, var/"run/kibana.pid" + (etc/"kibana").install Dir["config/*"] + rm_rf "config" + end end def post_install - inreplace "#{prefix}/config/kibana.yml", %{/var/run/kibana.pid}, var/"run/kibana.pid" - (etc/"kibana").install prefix/"config/kibana.yml" unless (etc/"kibana/kibana.yml").exist? - rm_rf prefix/"config" ln_s etc/"kibana", prefix/"config" (var/"lib/kibana/installedPlugins").mkpath