files/gitlab-cookbooks/gitlab/libraries/helper.rb
# c_rehash ran so we now have valid hashed names
# Skip all files that are not symlinks
# If they are symlinks, make sure they are valid certificates
c_rehash ran so we now have valid hashed names
Skip all files that are not symlinks
If they are symlinks, make sure they are valid certificates
c_rehash ran so we now have valid hashed names Skip all files that are not symlinks If they are symlinks make sure they are valid certificates
def link_to_omnibus_ssl_directory
    Dir.glob(File.join(@trusted_certs_dir, "*")) do |trusted_cert|
      if File.symlink?(trusted_cert) && is_x509_certificate?(trusted_cert)
        hash_name = File.basename(trusted_cert)
        certificate_path = File.realpath(trusted_cert)
        symlink_path = File.join(@omnibus_certs_dir, hash_name)
        FileUtils.ln_s certificate_path, symlink_path unless File.exist?(symlink_path)
      else
        puts "\n Skipping #{trusted_cert}."
      end
    end
  end
def link_to_omnibus_ssl_directory Dir . glob ( File . join ( @trusted_certs_dir , "*" ) ) do | trusted_cert | if File . symlink? ( trusted_cert ) && is_x509_certificate? ( trusted_cert ) hash_name = File . basename ( trusted_cert ) certificate_path = File . realpath ( trusted_cert ) symlink_path = File . join ( @omnibus_certs_dir , hash_name ) FileUtils . ln_s certificate_path , symlink_path unless File . exist? ( symlink_path ) else puts "\n Skipping #{trusted_cert}." end end end
c_rehash ran so we now have valid hashed names
Skip all files that are not symlinks
If they are symlinks, make sure they are valid certificates
c_rehash ran so we now have valid hashed names Skip all files that are not symlinks If they are symlinks make sure they are valid certificates