class Nginxtra::Actions::Restart

The Nginxtra::Actions::Restart class encapsulates restarting nginx.

Public Instance Methods

restart() click to toggle source

Restart nginx by stopping and starting.

# File lib/nginxtra/actions/restart.rb, line 8
def restart
  Nginxtra::Actions::Stop.new(@thor, @config).stop
  sleep 1
  Nginxtra::Actions::Start.new(@thor, @config).start
end