Sha256: b55a88410e104f0ac20d9d0d16beb8f3505819347efc6d4ea003fcfae6f96762
Contents?: true
Size: 1.39 KB
Versions: 98
Compression:
Stored size: 1.39 KB
Contents
# frozen_string_literal: true require 'avm/entries/jobs/base' require 'avm/eac_ubuntu_base0/apache' require 'eac_ruby_utils/core_ext' module Avm module EacRailsBase1 module Instances class SystemdUnit JOBS = %w[write_tasks_scheduler_command write_service link_service verify_service reload_systemd enable_service start_service].freeze include ::Avm::Entries::Jobs::Base require_sub __FILE__, include_modules: true delegate :platform_instance, to: :instance enable_listable lists.add_symbol :option, :exec_run, :restart def description "#{instance.id} Tasks Scheduler" end def exec_run? options[OPTION_EXEC_RUN] end def option_list self.class.lists.option end def restart options[OPTION_RESTART] end def unit_name "#{instance.id}_tasks_scheduler.service" end def user instance.install_username end private def sudo_execute!(*args) platform_instance.host_env.command(['sudo'] + args).execute! end def sudo_system!(*args) command_args = ['sudo'] + args infom "Running \"#{::Shellwords.join(command_args)}\"..." platform_instance.host_env.command(command_args).system! end end end end end
Version data entries
98 entries across 98 versions & 2 rubygems