class NginxUtils::CLI
Public Instance Methods
create_vhost()
click to toggle source
# File lib/nginx_utils/cli.rb, line 55 def create_vhost vhost = NginxUtils::VirtualHost.new(options) puts vhost.config end
logrotate()
click to toggle source
# File lib/nginx_utils/cli.rb, line 32 def logrotate NginxUtils::Logrotate.new(options).execute end
status(host="localhost")
click to toggle source
# File lib/nginx_utils/cli.rb, line 10 def status(host="localhost") result = NginxUtils::Status.get host: host if options[:only_value] puts result.values.join("\t") else puts "Active Connections: #{result[:active_connections]}" puts "Accepts: #{result[:accepts]} Handled: #{result[:handled]} Requests: #{result[:requests]}" puts "Reading: #{result[:reading]} Writing: #{result[:writing]} Waiting: #{result[:waiting]}" end end