lib/scout/command.rb in scout-5.6.3.pre vs lib/scout/command.rb in scout-5.6.4
- old
+ new
@@ -85,10 +85,14 @@
opts.on("--https-proxy URL", String,
"Optional https proxy for SSL traffic." ) do |https_proxy|
options[:https_proxy] = https_proxy
end
+ opts.on("--fqdn FQDN", String,
+ "Optional fully qualified domain name override." ) do |fqdn|
+ options[:fqdn] = fqdn
+ end
opts.separator " "
opts.separator "Common Options:"
opts.separator "--------------------------------------------------------------------------"
opts.on( "-h", "--help",
@@ -171,10 +175,11 @@
@level = options[:level] || "info"
@force = options[:force] || false
@server_name = options[:server_name]
@http_proxy = options[:http_proxy] || ""
@https_proxy = options[:https_proxy] || ""
+ @fqdn = options[:fqdn] || `hostname -f`
@options = options
@args = args
# create config dir if necessary
@@ -183,10 +188,10 @@
@log_path = File.join(@config_dir, "latest_run.log")
end
- attr_reader :server, :history, :config_dir, :log_path, :server_name
+ attr_reader :server, :history, :config_dir, :log_path, :server_name, :fqdn
def verbose?
@verbose
end