diff options
| author | Mike McQuaid | 2015-04-16 18:15:02 -0700 |
|---|---|---|
| committer | Mike McQuaid | 2015-04-17 10:45:30 -0700 |
| commit | 592dac3599fe042bf5da55930bb03113063bc9fa (patch) | |
| tree | 530b0b179c9fb49092b8fcc596da5eb39f772e7f | |
| parent | ba872f3e38832ff42c1a6258199646754f8f32f1 (diff) | |
| download | homebrew-592dac3599fe042bf5da55930bb03113063bc9fa.tar.bz2 | |
nginx: load configuration put in etc/servers.
I've heard this requested a few times.
Closes #38729.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
| -rw-r--r-- | Library/Formula/nginx.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Library/Formula/nginx.rb b/Library/Formula/nginx.rb index 660dd4e3f..491d13ef6 100644 --- a/Library/Formula/nginx.rb +++ b/Library/Formula/nginx.rb @@ -34,6 +34,7 @@ class Nginx < Formula def install # Changes default port to 8080 inreplace "conf/nginx.conf", "listen 80;", "listen 8080;" + open("conf/nginx.conf", "a") {|f| f.puts "include servers/*;" } pcre = Formula["pcre"] openssl = Formula["openssl"] @@ -78,6 +79,8 @@ class Nginx < Formula system "make" system "make", "install" man8.install "objs/nginx.8" + + (etc/"nginx/servers").mkpath (var/"run/nginx").mkpath end @@ -125,6 +128,8 @@ class Nginx < Formula The default port has been set in #{etc}/nginx/nginx.conf to 8080 so that nginx can run without sudo. + + nginx will load all files in #{etc}/nginx/servers/. EOS s << passenger_caveats if build.with? "passenger" s |
