Skip to content

Commit

Permalink
Use non-conflicting temp nginx vhost file
Browse files Browse the repository at this point in the history
We were using a conflicting file name for the temporary storage of
the nginx vhost config file in /tmp. The `put` command in capistrano
made use of the dir `/tmp/#{application}`.
  • Loading branch information
arturhoo committed Jan 15, 2014
1 parent 5ef6a20 commit 2f37619
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/matross/nginx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

desc "Setup application in nginx"
task :setup, :roles => :web do
template "nginx/nginx_virtual_host_conf.erb", "/tmp/#{application}"
run "#{sudo} mv /tmp/#{application} /etc/nginx/sites-available/#{application}"
template "nginx/nginx_virtual_host_conf.erb", "/tmp/nginx_virtual_host_conf"
run "#{sudo} mv /nginx_virtual_host_conf /etc/nginx/sites-available/#{application}"
run "#{sudo} ln -fs /etc/nginx/sites-available/#{application} /etc/nginx/sites-enabled/#{application}"
end
after "deploy:setup", "nginx:setup"
Expand Down

0 comments on commit 2f37619

Please sign in to comment.