Module: Avm::EacRailsBase1::Instances::SystemdUnit::Service
- Defined in:
- lib/avm/eac_rails_base1/instances/systemd_unit/service.rb
Instance Method Summary collapse
- #service_content ⇒ Object
- #service_exec_lines ⇒ Object
- #service_link_path ⇒ Object
- #service_path ⇒ Object
- #verify_service ⇒ Object
Instance Method Details
#service_content ⇒ Object
8 9 10 |
# File 'lib/avm/eac_rails_base1/instances/systemd_unit/service.rb', line 8 def service_content template.child('tasks_scheduler.service').apply(variables_source) end |
#service_exec_lines ⇒ Object
12 13 14 15 16 |
# File 'lib/avm/eac_rails_base1/instances/systemd_unit/service.rb', line 12 def service_exec_lines service_exec_operations .map { |k, v| "#{k}=#{tasks_scheduler_command_path} #{v}" } .join("\n") end |
#service_link_path ⇒ Object
22 23 24 |
# File 'lib/avm/eac_rails_base1/instances/systemd_unit/service.rb', line 22 def service_link_path ::Pathname.new('/etc/systemd/system/multi-user.target.wants').join(unit_name) end |
#service_path ⇒ Object
18 19 20 |
# File 'lib/avm/eac_rails_base1/instances/systemd_unit/service.rb', line 18 def service_path ::Pathname.new('/etc/systemd/system').join(unit_name) end |
#verify_service ⇒ Object
26 27 28 |
# File 'lib/avm/eac_rails_base1/instances/systemd_unit/service.rb', line 26 def verify_service sudo_system!('systemd-analyze', 'verify', service_path) end |