Skip to content

Commit

Permalink
Merge pull request #251 from Minitex/brew-prefix
Browse files Browse the repository at this point in the history
Use Homebrew's prefix when writing nginx config
  • Loading branch information
swandog30 authored Jan 4, 2023
2 parents 2b291ed + 9b72029 commit 33937ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/install_nginx_conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
require 'fileutils'
require 'erb'

brew_prefix = `brew --prefix`.strip
app_root = File.expand_path('../..', __FILE__)
config_template_path = File.join(app_root, 'config/local-nginx.conf.erb')
nginx_servers_path = '/usr/local/etc/nginx/servers'
nginx_servers_path = "#{brew_prefix}/etc/nginx/servers"
nginx_config_path = File.join(nginx_servers_path, 'mdl.conf')

FileUtils.mkdir_p(nginx_servers_path)
Expand Down

0 comments on commit 33937ba

Please sign in to comment.