Class: OsCtld::ContainerControl::Commands::StopRunit::Frontend

Inherits:
Frontend
  • Object
show all
Defined in:
lib/osctld/container_control/commands/stop_runit.rb

Instance Attribute Summary

Attributes inherited from Frontend

#command_class, #ct

Instance Method Summary collapse

Methods inherited from Frontend

#exec_runner, #fork_runner, #initialize

Constructor Details

This class inherits a constructor from OsCtld::ContainerControl::Frontend

Instance Method Details

#executetrue

Returns:

  • (true)


10
11
12
13
14
15
16
17
# File 'lib/osctld/container_control/commands/stop_runit.rb', line 10

def execute
  unless ct.running?
    raise ContainerControl::Error, 'container not running'
  end

  ret = exec_runner
  ret.ok? || ret
end