Module: MutagenCheckDaemon

Included in:
Takeltau::DockerContainer, Takeltau::InfoStatus, Takeltau::Mutagen, Takeltau::MutagenCheck, Takeltau::MutagenSocket
Defined in:
lib/takeltau/mutagen/check/daemon.rb

Overview

tau info status mutagen

Instance Method Summary collapse

Instance Method Details

#mutagen_check_daemonBoolean

Backend method for mutagen check daemon. rubocop:disable Metrics/AbcSize

Returns:

  • (Boolean)

    is mutagen available?



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/takeltau/mutagen/check/daemon.rb', line 8

def mutagen_check_daemon
  log.debug 'Check mutagen status'

  return false unless command_available_else_error? config.active['cmd_mutagen_check']

  # Are we inside a takelage container?
  unless _docker_container_lib_check_matrjoschka
    unless _file_exists? config.active['mutagen_socket_path_mutagen_host']
      log.error 'The mutagen socket path on the host is not available'
      return false
    end

    log.debug 'The mutagen daemon is available'
    return true
  end

  unless _mutagen_check_daemon_host_connection
    log.error 'A mutagen host connection is not available'
    return false
  end

  unless _file_exists? config.active['mutagen_socket_path_mutagen_container']
    log.error 'The mutagen socket path in the container is not available'
    return false
  end

  log.debug 'The mutagen daemon is available'
  true
end