Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding php.config.destroy

  • Loading branch information...
commit 875219dd0dac3f52f638a1bc63d49d6ad6546bab 1 parent b06b96a
Winton Welsh authored
Showing with 10 additions and 1 deletion.
  1. +5 −1 lib/recipes/deploy.rb
  2. +5 −0 lib/recipes/php.rb
View
6 lib/recipes/deploy.rb
@@ -39,7 +39,11 @@
desc "Stop servers and destroy all files"
task :destroy, :roles => :app do
deploy.stop
- mongrel.config.destroy if platform == :rails
+ if platform == :rails
+ mongrel.config.destroy
+ else
+ php.config.destroy
+ end
sudo "rm -Rf #{deploy_to}"
nginx.config.destroy
nginx.restart
View
5 lib/recipes/php.rb
@@ -11,6 +11,11 @@
task :nginx, :roles => :app do
upload_from_erb "#{nginx_dir}/vhosts/#{application}_#{stage}.conf", binding, :folder => 'php', :name => 'nginx.vhost'
end
+
+ desc "Destroy remote Nginx vhost"
+ task :destroy, :roles => :app do
+ sudo "rm -f #{nginx_dir}/vhosts/#{application}_#{stage}.conf"
+ end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.