lib/rmd/cli.rb in rmdd-0.1.3 vs lib/rmd/cli.rb in rmdd-0.1.4
- old
+ new
@@ -32,7 +32,35 @@
Cli.load_config
DeployService.restart(options[:server])
rescue Exception => e
$stdout.puts(e.message)
end
+
+ desc 'logs', 'Logs of servers'
+ method_option :server, aliases: '-s', desc: 'Server name', type: :string, required: true
+ def logs
+ Cli.load_config
+ DeployService.logs(options[:server])
+ rescue Exception => e
+ $stdout.puts(e.message)
+ end
+
+ desc 'nginx', 'Logs of the nginx server'
+ method_option :server, aliases: '-s', desc: 'Server name', type: :string, required: true
+ method_option :type, aliases: '-t', desc: "Type of log: #{TYPE}", type: :string, required: true
+ def nginx
+ Cli.load_config
+ DeployService.nginx(options[:server], options[:type])
+ rescue Exception => e
+ $stdout.puts(e.message)
+ end
+
+ desc 'console', 'Console of servers'
+ method_option :server, aliases: '-s', desc: 'Server name', type: :string, required: true
+ def console
+ Cli.load_config
+ DeployService.console(options[:server])
+ rescue Exception => e
+ $stdout.puts(e.message)
+ end
end
end