From aa43ee0bb395af3b79f5cfc58fd254a45922e997 Mon Sep 17 00:00:00 2001 From: Nicholas Ngai <36081376+nicholasngai@users.noreply.github.com> Date: Sat, 19 Oct 2019 01:50:35 -0700 Subject: [PATCH] Add service plist to Stunnel (#45471) --- Formula/stunnel.rb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Formula/stunnel.rb b/Formula/stunnel.rb index fbc8a8762a..aca85e4c8c 100644 --- a/Formula/stunnel.rb +++ b/Formula/stunnel.rb @@ -50,9 +50,32 @@ class Stunnel < Formula In your stunnel configuration, specify a SSL certificate with the "cert =" option for each service. + + To use Stunnel with Homebrew services, make sure to set "foreground = yes" in + your Stunnel configuration. EOS end + plist_options :manual => "stunnel" + + def plist; <<~EOS + + + + + Label + #{plist_name} + ProgramArguments + + #{opt_bin}/stunnel + + RunAtLoad + + + + EOS + end + test do (testpath/"tstunnel.conf").write <<~EOS cert = #{etc}/stunnel/stunnel.pem