From d5f3fd3e8de31c9114f782b8590db7a76c5bea4a Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Mon, 18 Mar 2024 16:07:32 +0000 Subject: [PATCH] Use service directive and remove plist --- Formula/crab.rb | 34 +++++----------------------------- 1 file changed, 5 insertions(+), 29 deletions(-) diff --git a/Formula/crab.rb b/Formula/crab.rb index 5b50906..e8cc445 100644 --- a/Formula/crab.rb +++ b/Formula/crab.rb @@ -16,36 +16,12 @@ def install venv.pip_install_and_link buildpath end - def plist - <<~EOS - - - - - KeepAlive - - Label - #{plist_name} - ProgramArguments - - #{bin}/crab - router - - RunAtLoad - - WorkingDirectory - #{HOMEBREW_PREFIX} - StandardOutPath - #{var}/log/crab.log - StandardErrorPath - #{var}/log/crab.log - - - EOS - end - service do - name macos: "#{plist_name}" + run [bin/"crab", "router"] + keep_alive true + working_dir HOMEBREW_PREFIX + log_path var/"log/crab.log" + error_log_path var/"log/crab.log" end test do