lib/ms_deploy/recipes/nginx.rb in ms_deploy-0.0.7 vs lib/ms_deploy/recipes/nginx.rb in ms_deploy-0.0.10

- old
+ new

@@ -28,19 +28,19 @@ run "sudo /etc/init.d/nginx restart" end task :install do template_path = File.expand_path('../../templates/vhost.erb', __FILE__) - vars = {'application'=> application, 'project_root' => deploy_to + '/current', 'domain' => vhost_domain} + vars = {'application'=> application, 'project_root' => deploy_to + '/current', 'domain' => vhost_domain, 'stage' => stage, 'auth_basic_title' => fetch(:auth_basic_title, nil), 'auth_basic_password_file' => fetch(:auth_basic_password_file, nil)} config_path = "#{shared_path}/config/#{application}_vhost.conf" put(render_erb_template(template_path, vars), config_path) - sudo "rm -f /etc/nginx/sites-enabled/#{application}.conf" - sudo "ln -s #{config_path} /etc/nginx/sites-enabled/#{application}.conf" + sudo "rm -f /etc/nginx/sites-enabled/#{application}_#{stage}.conf" + sudo "ln -s #{config_path} /etc/nginx/sites-enabled/#{application}_#{stage}.conf" end task :uninstall do - sudo "rm -f /etc/nginx/sites-enabled/#{application}.conf" + sudo "rm -f /etc/nginx/sites-enabled/#{application}_#{stage}.conf" end end end after :"deploy:setup", :"service:nginx:install";