Created
April 16, 2009 19:30
-
-
Save adelcambre/96610 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff -Nru passenger-2.2.0.orig/bin/passenger-install-nginx-module passenger-2.2.0/bin/passenger-install-nginx-module | |
| --- passenger-2.2.0.orig/bin/passenger-install-nginx-module 2009-04-16 10:42:11.000000000 -0700 | |
| +++ passenger-2.2.0/bin/passenger-install-nginx-module 2009-04-16 12:07:31.000000000 -0700 | |
| @@ -62,6 +62,13 @@ | |
| check_write_permission_to_passenger_root || exit(1) | |
| download_and_install = should_we_download_and_install_nginx_automatically? | |
| + if download_and_install == 3 | |
| + compile_passenger_support_files | |
| + show_passenger_configure_line(build_nginx_configure_command("/opt/nginx")) | |
| + show_passenger_config_snippets("/opt/nginx/conf/nginx.conf") | |
| + show_deployment_example | |
| + exit(0) | |
| + end | |
| if pcre_is_installed? | |
| @pcre_source_dir = nil | |
| else | |
| @@ -131,13 +138,16 @@ | |
| if @auto_download | |
| color_puts "<b>=> Proceeding with choice 1.</b>" | |
| - return true | |
| + return 1 | |
| elsif @nginx_source_dir | |
| color_puts "<b>=> Proceeding with choice 2.</b>" | |
| return false | |
| + elsif @doing_my_own_thing | |
| + color_puts "<b>=> Proceeding with choice 3.</b>" | |
| + return 3 | |
| else | |
| - choice = prompt("Enter your choice (1 or 2) or press Ctrl-C to abort") do |input| | |
| - if input == "1" || input == "2" | |
| + choice = prompt("Enter your choice (1 or 2 or 3) or press Ctrl-C to abort") do |input| | |
| + if input == "1" || input == "2" || input == "3" | |
| true | |
| elsif input.empty? | |
| color_puts "<red>No choice has been given.</red>" | |
| @@ -147,7 +157,7 @@ | |
| false | |
| end | |
| end | |
| - return choice == "1" | |
| + return (choice != "2") && choice.to_i | |
| end | |
| end | |
| @@ -340,6 +350,12 @@ | |
| wait | |
| end | |
| + def show_passenger_configure_line(configure_line) | |
| + render_template 'nginx/configure_line', | |
| + :configure => configure_line | |
| + wait | |
| + end | |
| + | |
| def show_deployment_example | |
| line | |
| puts | |
| diff -Nru passenger-2.2.0.orig/lib/phusion_passenger/templates/nginx/configure_line.txt.erb passenger-2.2.0/lib/phusion_passenger/templates/nginx/configure_line.txt.erb | |
| --- passenger-2.2.0.orig/lib/phusion_passenger/templates/nginx/configure_line.txt.erb 1969-12-31 16:00:00.000000000 -0800 | |
| +++ passenger-2.2.0/lib/phusion_passenger/templates/nginx/configure_line.txt.erb 2009-04-16 12:10:02.000000000 -0700 | |
| @@ -0,0 +1,10 @@ | |
| +<banner>Phusion Passenger Nginx Module was successfully built.</banner> | |
| + | |
| +This is an example ./configure line you can use to enable passenger support | |
| +with your own version of nginx. | |
| + | |
| + <b><%= @configure %></b> | |
| + | |
| +Once you build nginx with the passenger module, you will be good to go. | |
| + | |
| +<b>Press ENTER to continue.</b> | |
| diff -Nru passenger-2.2.0.orig/lib/phusion_passenger/templates/nginx/query_download_and_install.txt.erb passenger-2.2.0/lib/phusion_passenger/templates/nginx/query_download_and_install.txt.erb | |
| --- passenger-2.2.0.orig/lib/phusion_passenger/templates/nginx/query_download_and_install.txt.erb 2009-04-16 10:42:12.000000000 -0700 | |
| +++ passenger-2.2.0/lib/phusion_passenger/templates/nginx/query_download_and_install.txt.erb 2009-04-16 12:04:36.000000000 -0700 | |
| @@ -17,5 +17,8 @@ | |
| the Nginx source code, 2) run the 'configure' script according to your | |
| instructions, and 3) run 'make install'. | |
| + <yellow><b>3. I will install my own nginx, just make me the module and show me the configure line</b></yellow> | |
| + Choose this if you want to compile your own nginx configuration separately. | |
| + | |
| Whichever you choose, if you already have an existing Nginx configuration file, | |
| then it will be preserved. | |
| \ No newline at end of file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment