module Net::Openvpn

Constants

Client
VERSION

Public Class Methods

basepath(path="") click to toggle source
# File lib/net/openvpn.rb, line 21
def basepath(path="")
  path = "/#{path}" unless path.empty?
  "/etc/openvpn#{path}"
end
ccdpath(path="") click to toggle source
# File lib/net/openvpn.rb, line 26
def ccdpath(path="")
  path = "/#{path}" unless path.empty?
  basepath "ccd#{path}"
end
generator(type) click to toggle source
# File lib/net/openvpn.rb, line 39
def generator(type)
  case type
  when :client
    Net::Openvpn::Generators::Keys::Client
  when :server
    Net::Openvpn::Generators::Keys::Server
  when :directory
    Net::Openvpn::Generators::Keys::Directory
  when :authority
    Net::Openvpn::Generators::Keys::Authority
  end
end
host(hostname) click to toggle source
# File lib/net/openvpn.rb, line 31
def host(hostname)
  Net::Openvpn::Host.new(hostname)
end
props() click to toggle source

Returns the default key properties merged with the properties stored in /etc/openvpn/props.yml

# File lib/net/openvpn.rb, line 54
def props
  props = Openvpn::Generators::Keys::Properties

  props.default.merge props.yaml
end
server(name) click to toggle source
# File lib/net/openvpn.rb, line 35
def server(name)
  Net::Openvpn::Server.new(name)
end