Sha256: 1b232295b8eccdc69d275bf2b451f8841a9f4feefacf1fc5818a196b218d09db
Contents?: true
Size: 583 Bytes
Versions: 1
Compression:
Stored size: 583 Bytes
Contents
namespace :nginx do %w(start stop restart reload).each do |task_name| desc "#{task } Nginx" task task_name do on roles(:app), in: :sequence, wait: 5 do sudo "/etc/init.d/nginx #{task_name}" end end end desc "Remove default Nginx Virtual Host" task :remove_default_vhost do on roles(:app) do if test("[ -f /etc/nginx/sites-enabled/default ]") sudo "rm /etc/nginx/sites-enabled/default" puts "removed default Nginx Virtualhost" else puts "No default Nginx Virtualhost to remove" end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
meataxe-0.6.2 | lib/meataxe/capistrano/tasks/nginx.cap |