Class: Avm::EacRailsBase1::Instances::SystemdUnit

Inherits:
Object
  • Object
show all
Includes:
Avm::Entries::Jobs::Base
Defined in:
lib/avm/eac_rails_base1/instances/systemd_unit.rb,
lib/avm/eac_rails_base1/instances/systemd_unit/service.rb,
lib/avm/eac_rails_base1/instances/systemd_unit/tasks_scheduler_command.rb

Defined Under Namespace

Modules: Service, TasksSchedulerCommand

Constant Summary collapse

JOBS =
%w[write_tasks_scheduler_command write_service link_service verify_service
reload_systemd enable_service start_service].freeze

Instance Method Summary collapse

Instance Method Details

#descriptionObject



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

def description
  "#{instance.id} Tasks Scheduler"
end

#exec_run?Boolean

Returns:

  • (Boolean)


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

def exec_run?
  options[OPTION_EXEC_RUN]
end

#option_listObject



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

def option_list
  self.class.lists.option
end

#restartObject



33
34
35
# File 'lib/avm/eac_rails_base1/instances/systemd_unit.rb', line 33

def restart
  options[OPTION_RESTART]
end

#unit_nameObject



37
38
39
# File 'lib/avm/eac_rails_base1/instances/systemd_unit.rb', line 37

def unit_name
  "#{instance.id}_tasks_scheduler.service"
end

#userObject



41
42
43
# File 'lib/avm/eac_rails_base1/instances/systemd_unit.rb', line 41

def user
  instance.install_username
end