Sha256: 7dea0eb2e6b3dfa0d5d0947c184615b3f5d374be553b0a884e2ef2fa8dca24d6
Contents?: true
Size: 996 Bytes
Versions: 39
Compression:
Stored size: 996 Bytes
Contents
# frozen_string_literal: true # tau info status ssh module InfoStatusSSH # Backend method for info status ssh. # @return [Boolean] is ssh available? def info_status_ssh log.debug 'Check ssh status' ssh_auth_sock = ENV.fetch('SSH_AUTH_SOCK', nil) gpg_ssh_socket = _info_status_ssh_socket_path.chomp unless ssh_auth_sock == gpg_ssh_socket log.error 'ssh does not use gpg ssh socket' return false end unless _info_status_ssh_keys log.error 'ssh keys are not available' return false end unless _file_exists? gpg_ssh_socket log.error 'gpg ssh socket is not available' return false end log.debug 'ssh is available' true end private # Get ssh socket path def _info_status_ssh_socket_path run config.active['cmd_info_status_ssh_socket'] end # Check ssh keys def _info_status_ssh_keys status_keys = try config.active['cmd_info_status_ssh_keys'] status_keys.exitstatus.zero? end end
Version data entries
39 entries across 39 versions & 1 rubygems