Sha256: 43e351003c790c8f54efa489cc115e2ff158a7b6a9e8586f51f098dbb251b115
Contents?: true
Size: 669 Bytes
Versions: 14
Compression:
Stored size: 669 Bytes
Contents
module Kontena::Cli::Vpn class ConfigCommand < Clamp::Command include Kontena::Cli::Common 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
14 entries across 14 versions & 1 rubygems