Module: Avm::EacRailsBase1::Instances::SystemdUnit::Service

Defined in:
lib/avm/eac_rails_base1/instances/systemd_unit/service.rb

Instance Method Summary collapse

Instance Method Details

#service_contentObject



10
11
12
# File 'lib/avm/eac_rails_base1/instances/systemd_unit/service.rb', line 10

def service_content
  template.child('tasks_scheduler.service').apply(variables_source)
end

#service_exec_linesObject



14
15
16
17
18
# File 'lib/avm/eac_rails_base1/instances/systemd_unit/service.rb', line 14

def service_exec_lines
  service_exec_operations
    .map { |k, v| "#{k}=#{tasks_scheduler_command_path} #{v}" }
    .join("\n")
end


24
25
26
# File 'lib/avm/eac_rails_base1/instances/systemd_unit/service.rb', line 24

def service_link_path
  ::Pathname.new('/etc/systemd/system/multi-user.target.wants').join(unit_name)
end

#service_pathObject



20
21
22
# File 'lib/avm/eac_rails_base1/instances/systemd_unit/service.rb', line 20

def service_path
  ::Pathname.new('/etc/systemd/system').join(unit_name)
end

#verify_serviceObject



28
29
30
# File 'lib/avm/eac_rails_base1/instances/systemd_unit/service.rb', line 28

def verify_service
  sudo_system!('systemd-analyze', 'verify', service_path)
end