Module: Nginxtra::Action
- Included in:
- Nginxtra::Actions::Compile, Nginxtra::Actions::Convert, Nginxtra::Actions::Install, Nginxtra::Actions::Print, Nginxtra::Actions::Rails::Server, Nginxtra::Actions::Reload, Nginxtra::Actions::Restart, Nginxtra::Actions::Start, Nginxtra::Actions::Status, Nginxtra::Actions::Stop
- Defined in:
- lib/nginxtra/action.rb
Class Attribute Summary collapse
-
.ignore_force ⇒ Object
Returns the value of attribute ignore_force.
Instance Method Summary collapse
-
#daemon(action, additional_options = nil) ⇒ Object
Run a daemon command to start or stop the nginx process.
- #initialize(thor, config) ⇒ Object
Class Attribute Details
.ignore_force ⇒ Object
Returns the value of attribute ignore_force.
46 47 48 |
# File 'lib/nginxtra/action.rb', line 46 def ignore_force @ignore_force end |
Instance Method Details
#daemon(action, additional_options = nil) ⇒ Object
Run a daemon command to start or stop the nginx process.
9 10 11 12 |
# File 'lib/nginxtra/action.rb', line 9 def daemon(action, = nil) action = "#{action} #{}" if run! "#{sudo}start-stop-daemon --#{action} --quiet --pidfile #{Nginxtra::Config.nginx_pidfile} --exec #{Nginxtra::Config.nginx_executable}" end |
#initialize(thor, config) ⇒ Object
3 4 5 6 |
# File 'lib/nginxtra/action.rb', line 3 def initialize(thor, config) @thor = thor @config = config end |