From 27b93946e8991a85539b3f6405e6a1dc829e5d8f Mon Sep 17 00:00:00 2001 From: Guan Bo Date: Mon, 20 Nov 2023 20:13:27 +0800 Subject: [PATCH] Update: plist_opitons => service plist_options is not support anymore, switch to service --- Formula/trojan.rb | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/Formula/trojan.rb b/Formula/trojan.rb index d287ac9..1606f8c 100644 --- a/Formula/trojan.rb +++ b/Formula/trojan.rb @@ -15,26 +15,9 @@ def install system "make", "install" end - plist_options :manual => "trojan #{HOMEBREW_PREFIX}/etc/trojan/config.json" - - def plist; <<~EOS - - - - - KeepAlive - - RunAtLoad - - Label - #{plist_name} - ProgramArguments - - #{opt_bin}/trojan - #{etc}/trojan/config.json - - - - EOS + service do + run [opt_bin/"trojan", etc/"trojan/config.json"] + run_type :immediate + keep_alive true end end