Sha256: f76b153de4fddd92d3afc188f63f0b8d2521c0b051164b4b64a9d01864a65ee1
Contents?: true
Size: 707 Bytes
Versions: 32
Compression:
Stored size: 707 Bytes
Contents
module Kontena::Cli::Vpn class ConfigCommand < Clamp::Command include Kontena::Cli::Common include Kontena::Cli::GridOptions def execute require 'rbconfig' require_api_url payload = {cmd: ['/usr/local/bin/ovpn_getclient', 'KONTENA_VPN_CLIENT']} stdout, stderr = client(require_token).post("containers/#{current_grid}/vpn/vpn-1/exec", payload) if linux? stdout << "\n" stdout << "up /etc/openvpn/update-resolv-conf\n" stdout << "down /etc/openvpn/update-resolv-conf\n" end puts stdout end # @return [Boolean] def linux? host_os = RbConfig::CONFIG['host_os'] host_os.include?('linux') end end end
Version data entries
32 entries across 32 versions & 1 rubygems