Class: Nginxtra::Actions::Restart

Inherits:
Object
  • Object
show all
Includes:
Nginxtra::Action
Defined in:
lib/nginxtra/actions/restart.rb

Overview

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

Instance Method Summary collapse

Methods included from Nginxtra::Action

#daemon, #initialize

Instance Method Details

#restartObject

Restart nginx by stopping and starting.



8
9
10
11
12
# 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