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
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_lines ⇒ Object
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 |
#service_link_path ⇒ Object
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_path ⇒ Object
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_service ⇒ Object
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 |