class Nginxtra::Actions::Status

The Nginxtra::Actions::Status class encapsulates checking on the status of nginx (whether or not it is running based on the pid file).

Public Instance Methods

colored_message() click to toggle source
# File lib/nginxtra/actions/status.rb, line 13
def colored_message
  if Nginxtra::Config.nginx_running?
    @thor.set_color "running", :green, true
  else
    @thor.set_color "stopped", :red, true
  end
end
status() click to toggle source
# File lib/nginxtra/actions/status.rb, line 9
def status
  @thor.say "The nginx server status: #{colored_message}"
end