Skip to content

Commit e2f24e7

Browse files
committed
default to CNAME
1 parent 61c8079 commit e2f24e7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/cert-functions

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ cert-resource-record-valid() {
136136
#
137137
# Usage: cert-resource-record-valid <name> <type> <value>
138138

139-
[[ "$#" -ne 3 ]] && __bma_usage "<name> <type> <value" && return 1
139+
[[ "$#" -lt 2 ]] && __bma_usage "<name> <value> [type]" && return 1
140140

141141
local name="$1"
142-
local type="$2"
143-
local value="$3"
142+
local value="$2"
143+
local type="${3:-CNAME}"
144144

145145
# Perform the DNS query
146146
local output=$(dig +noall +answer "$name" "$type")

0 commit comments

Comments
 (0)