LocalhostSourceLocalhostSystemLinux

module Linux

Linux specific system operations.

Definitions

def self.install(certificate)

Install a certificate into the system trust store.

Signature

parameter certificate String

The path to the certificate file.

Implementation

def self.install(certificate)
	filename = File.basename(certificate)
	destination = "/usr/local/share/ca-certificates/localhost-#{filename}"
	
	system("sudo", "cp", certificate, destination)
	system("sudo", "update-ca-certificates")
end