Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: openresty-debug.rb: use 'service' instead of deprecated 'plist'. #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 6 additions & 25 deletions Formula/openresty-debug.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class OpenrestyDebug < Formula
desc "Scalable Web Platform by Extending NGINX with Lua"
homepage "https://openresty.org"
VERSION = "1.21.4.1".freeze
revision 1
revision 2
url "https://openresty.org/download/openresty-#{VERSION}.tar.gz"
sha256 "0c5093b64f7821e85065c99e5d4e6cc31820cfd7f37b9a0dec84209d87a2af99"

Expand Down Expand Up @@ -77,30 +77,11 @@ def install
system "make", "install"
end

plist_options :manual => "openresty"

def plist; <<~EOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>#{plist_name}</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>#{opt_prefix}/bin/openresty</string>
<string>-g</string>
<string>daemon off;</string>
</array>
<key>WorkingDirectory</key>
<string>#{HOMEBREW_PREFIX}</string>
</dict>
</plist>
EOS
service do
run [opt_prefix/"bin/openresty", "-g", "daemon off;"]
working_dir HOMEBREW_PREFIX
keep_alive true
require_root true
end

def caveats
Expand Down