diff --git a/bin/commands-openvpn.conf b/bin/commands-openvpn.conf new file mode 100644 index 0000000..f8bb6de --- /dev/null +++ b/bin/commands-openvpn.conf @@ -0,0 +1,61 @@ +object CheckCommand "openvpn" { + import "ipv4-or-ipv6" + + command = [ ConfigDir + "/scripts/check_openvpn" ] + + arguments = { + "(no key)" = { + value = "$openvpn_address$" + description = "the OpenVPN host name or IP" + skip_key = true + required = true + order = 99 + } + "-p" = { + value = "$openvpn_port$" + description = "set port number (default is 1194)" + } + "-t" = { + set_if = "$openvpn_tcp$" + description = "use tcp instead of udp" + } + "--timeout" = { + value = "$openvpn_timeout$" + description = "set timeout in seconds, for udp counted per packet (default is 2)" + } + "--digest" = { + value = "$openvpn_digest$" + description = "set digest algorithm (default is sha1)" + } + "--digest-size" = { + value = "$openvpn_digest_size$" + description = "set HMAC digest size" + } + "--digest-key-client" = { + value = "$openvpn_digest-key-client$" + description = "set client HMAC key" + } + "--digest-key-server" = { + value = "$openvpn_digest_key_server$" + description = "set server HMAC key for packet validation" + } + "--tls-auth" = { + value = "$openvpn_tls_auth$" + description = "set tls-auth file" + } + "--tls-auth-inverse" = { + set_if = "$openvpn_tls_auth_inverse$" + description = "set tls-auth file direction to inverse (1)" + } + "--retrycount" = { + value = "$openvpn_retrycount$" + description = "number of udp retries before giving up (default is 3)" + } + "--no-validation" = { + set_if = "$openvpn_no-validation$" + description = "do not validate response" + } + } + + vars.openvpn_address = "$address$" +}