From ca495e06d65d075ced888c8a82badef75944231b Mon Sep 17 00:00:00 2001 From: mapleran Date: Wed, 23 Aug 2023 10:54:42 +0800 Subject: [PATCH] change plist_options to service --- Formula/elasticsearch-full.rb | 35 +++++------------------------------ 1 file changed, 5 insertions(+), 30 deletions(-) diff --git a/Formula/elasticsearch-full.rb b/Formula/elasticsearch-full.rb index 52f9a4f..967756e 100644 --- a/Formula/elasticsearch-full.rb +++ b/Formula/elasticsearch-full.rb @@ -65,36 +65,11 @@ def caveats s end - plist_options :manual => "elasticsearch" - - def plist - <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/elasticsearch - - EnvironmentVariables - - - RunAtLoad - - WorkingDirectory - #{var} - StandardErrorPath - #{var}/log/elasticsearch.log - StandardOutPath - #{var}/log/elasticsearch.log - - - EOS + service do + run [opt_bin/"elasticsearch"] + working_dir var + log_path var/"log/elasticsearch/elasticsearch.log" + error_log_path var/"log/elasticsearch/elasticsearch.log" end test do