Class: LogicalConstruct::GroundControl::InstallInit

Inherits:
RunOnTarget
  • Object
show all
Defined in:
lib/logical-construct/ground-control/setup/install-init.rb

Constant Summary

Constants inherited from RunOnTarget

RunOnTarget::SSH_OPTIONS

Instance Method Summary collapse

Methods inherited from RunOnTarget

#remote_task

Instance Method Details

#default_configuration(setup) ⇒ Object



12
13
14
15
# File 'lib/logical-construct/ground-control/setup/install-init.rb', line 12

def default_configuration(setup)
  super
  setup.copy_settings_to(self)
end

#defineObject



23
24
25
26
27
28
29
# File 'lib/logical-construct/ground-control/setup/install-init.rb', line 23

def define
  remote_task(:install_init) do |task|
    task.command = cmd("install", "-T", source_path, target_path) &
      ["rc-update", "add", service_name, "default"]
  end
  bracket_task(:remote_config, :install_init, :remote_setup)
end

#resolve_configurationObject



17
18
19
20
21
# File 'lib/logical-construct/ground-control/setup/install-init.rb', line 17

def resolve_configuration
  super
  self.source_path ||= File::join(construct_dir, "construct.init.d")
  self.target_path ||= File::join(initd_path, service_name)
end