Class: Backdat::Application::Server
- Inherits:
-
Backdat::Application
- Object
- Backdat::Application
- Backdat::Application::Server
- Defined in:
- lib/backdat/application/backdat-server.rb
Overview
The backdat server command line parser.
Instance Method Summary collapse
-
#initialize ⇒ Server
constructor
Grabs all of the cli parameters and generates the mixlib config object.
-
#run_application ⇒ Object
Runs the backdat server.
-
#setup_application ⇒ Object
Configures the backdat server based on the cli parameters.
Methods inherited from Backdat::Application
#configure_backdat, #configure_logging, debug_stacktrace, exit!, fatal!, #reconfigure, #run
Constructor Details
Instance Method Details
#run_application ⇒ Object
Runs the backdat server.
112 113 114 115 116 117 118 |
# File 'lib/backdat/application/backdat-server.rb', line 112 def run_application if Backdat::Config[:daemonize] Backdat::Config[:server] = true Backdat::Daemon.daemonize("backdat") end @app.run end |
#setup_application ⇒ Object
Configures the backdat server based on the cli parameters.
101 102 103 104 105 106 107 108 109 |
# File 'lib/backdat/application/backdat-server.rb', line 101 def setup_application Backdat::Daemon.change_privilege Backdat::Config[:server] = true if Backdat::Config[:daemonize] if Backdat::Config[:server] @app = Backdat::Server.new else @app = Backdat::Client.new(*ARGV) end end |