Sha256: ba2b169b4ac059d2ebc96931ef15b6feeab2aff0b3ca123e0840cf1c7d8af3a1

Contents?: true

Size: 683 Bytes

Versions: 13

Compression:

Stored size: 683 Bytes

Contents

module VagrantPlugins
  module Cachier
    module Cap
      module Debian
        module AptCacherDir
          CACHER_CONF      = '/etc/apt-cacher-ng/acng.conf'
          CACHER_CACHE_DIR = "$(cat #{CACHER_CONF} | grep CacheDir | cut -d' ' -f 2)"

          def self.apt_cacher_dir(machine)
            cache_dir = nil
            machine.communicate.tap do |comm|
              return unless comm.test("test -f #{CACHER_CONF}")
              comm.execute "echo #{CACHER_CACHE_DIR}" do |buffer, output|
                cache_dir = output.chomp if buffer == :stdout
              end
            end
            return cache_dir
          end
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
vagrant-cachier-1.2.1 lib/vagrant-cachier/cap/debian/apt_cacher_dir.rb
vagrant-cachier-1.2.0 lib/vagrant-cachier/cap/debian/apt_cacher_dir.rb
vagrant-cachier-1.1.0 lib/vagrant-cachier/cap/debian/apt_cacher_dir.rb
vagrant-cachier-1.0.0 lib/vagrant-cachier/cap/debian/apt_cacher_dir.rb
vagrant-cachier-0.9.0 lib/vagrant-cachier/cap/debian/apt_cacher_dir.rb
vagrant-cachier-0.8.0 lib/vagrant-cachier/cap/debian/apt_cacher_dir.rb
vagrant-cachier-0.7.2 lib/vagrant-cachier/cap/debian/apt_cacher_dir.rb
vagrant-cachier-0.7.1 lib/vagrant-cachier/cap/debian/apt_cacher_dir.rb
vagrant-cachier-0.7.0 lib/vagrant-cachier/cap/debian/apt_cacher_dir.rb
vagrant-cachier-0.6.0 lib/vagrant-cachier/cap/debian/apt_cacher_dir.rb
vagrant-cachier-0.5.1 lib/vagrant-cachier/cap/debian/apt_cacher_dir.rb
vagrant-cachier-0.5.0 lib/vagrant-cachier/cap/debian/apt_cacher_dir.rb
vagrant-cachier-0.4.1 lib/vagrant-cachier/cap/debian/apt_cacher_dir.rb