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