aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorMike McQuaid2012-11-22 21:53:12 +0000
committerMike McQuaid2012-11-22 21:58:25 +0000
commitb7e0430db84d4325e86a723796c397ed2d859c5f (patch)
tree9852c9a7a98361d96c7be418bcabd7e230771633 /Library/Formula
parente7edbf22673a5b918be899b484fe18b768f6aa52 (diff)
downloadhomebrew-b7e0430db84d4325e86a723796c397ed2d859c5f.tar.bz2
Fix nginx plist.
Fix indentation, use opt_prefix and make sure nginx is not daemonized so that launchd can stop it. Fixes #14876.
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/nginx.rb47
1 files changed, 24 insertions, 23 deletions
diff --git a/Library/Formula/nginx.rb b/Library/Formula/nginx.rb
index 4fab59211..a05b9091e 100644
--- a/Library/Formula/nginx.rb
+++ b/Library/Formula/nginx.rb
@@ -81,29 +81,30 @@ class Nginx < Formula
EOS
end
- def startup_plist
- return <<-EOPLIST
-<?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>UserName</key>
- <string>#{`whoami`.chomp}</string>
- <key>ProgramArguments</key>
- <array>
- <string>#{HOMEBREW_PREFIX}/sbin/nginx</string>
- </array>
- <key>WorkingDirectory</key>
- <string>#{HOMEBREW_PREFIX}</string>
- </dict>
-</plist>
- EOPLIST
+ def startup_plist; <<-EOS.undent
+ <?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>UserName</key>
+ <string>#{`whoami`.chomp}</string>
+ <key>ProgramArguments</key>
+ <array>
+ <string>#{opt_prefix}/sbin/nginx</string>
+ <string>-g</string>
+ <string>daemon off;</string>
+ </array>
+ <key>WorkingDirectory</key>
+ <string>#{HOMEBREW_PREFIX}</string>
+ </dict>
+ </plist>
+ EOS
end
end