Sha256: 557ecb1160822b100594784fed3d0e066b046bbb91fb193244ccf8192c2ee3c5

Contents?: true

Size: 1.06 KB

Versions: 23

Compression:

Stored size: 1.06 KB

Contents

# frozen_string_literal: true

require 'avm/apps/jobs/base'
require 'avm/eac_ubuntu_base0/apache'
require 'eac_ruby_utils/core_ext'

module Avm
  module EacWebappBase0
    class ApachePath
      JOBS = %w[write_available_conf enable_conf reload_apache].freeze
      include ::Avm::Apps::Jobs::Base

      def content
        ::Avm::EacWebappBase0::ApachePath.template.child('default.conf').apply(variables_source)
      end

      def document_root
        instance.read_entry(::Avm::Instances::EntryKeys::FS_PATH)
      end

      def extra_content
        ''
      end

      private

      def apache_uncached
        ::Avm::EacUbuntuBase0::Apache.new(instance.host_env)
      end

      def enable_conf
        infom 'Enabling configuration...'
        conf.enable
      end

      def reload_apache
        infom 'Reloading Apache...'
        apache.service('reload')
      end

      def conf_uncached
        apache.conf(instance.id)
      end

      def write_available_conf
        infom 'Writing available configuration...'
        conf.write(content)
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
avm-tools-0.106.0 vendor/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/apache_path.rb
avm-eac_webapp_base0-0.1.1 lib/avm/eac_webapp_base0/apache_path.rb
avm-tools-0.105.0 vendor/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/apache_path.rb
avm-tools-0.104.0 vendor/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/apache_path.rb
avm-tools-0.103.1 vendor/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/apache_path.rb
avm-eac_webapp_base0-0.1.0 lib/avm/eac_webapp_base0/apache_path.rb
avm-tools-0.103.0 vendor/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/apache_path.rb
avm-tools-0.102.2 lib/avm/eac_webapp_base0/apache_path.rb
avm-tools-0.102.1 lib/avm/eac_webapp_base0/apache_path.rb
avm-tools-0.102.0 lib/avm/eac_webapp_base0/apache_path.rb
avm-tools-0.101.0 lib/avm/eac_webapp_base0/apache_path.rb
avm-tools-0.100.0 lib/avm/eac_webapp_base0/apache_path.rb
avm-tools-0.99.1 lib/avm/eac_webapp_base0/apache_path.rb
avm-tools-0.99.0 lib/avm/eac_webapp_base0/apache_path.rb
avm-tools-0.98.0 lib/avm/eac_webapp_base0/apache_path.rb
avm-tools-0.97.0 lib/avm/eac_webapp_base0/apache_path.rb
avm-tools-0.96.0 lib/avm/eac_webapp_base0/apache_path.rb
avm-tools-0.95.0 lib/avm/eac_webapp_base0/apache_path.rb
avm-tools-0.94.3 lib/avm/eac_webapp_base0/apache_path.rb
avm-tools-0.94.2 lib/avm/eac_webapp_base0/apache_path.rb