224
224
# 2020-04-16 Add -i|--install command line option (2.23)
225
225
# 2020-04-19 Remove dependency on seq, ensure clean_up doesn't try to delete /tmp (2.24)
226
226
# 2020-04-20 Check for domain using all DNS utilities (2.25)
227
+ # 2020-04-22 Fix HAS_HOST and HAS_NSLOOKUP checks - wolfaba
228
+ # 2020-04-22 Fix domain case conversion for different locales (2.26) - glynge
227
229
# ----------------------------------------------------------------------------------------
228
230
229
231
PROGNAME=${0##*/ }
230
232
PROGDIR=" $( cd " $( dirname " $0 " ) " || exit ; pwd -P; ) "
231
- VERSION=" 2.25 "
233
+ VERSION=" 2.26 "
232
234
233
235
# defaults
234
236
ACCOUNT_KEY_LENGTH=4096
@@ -532,14 +534,14 @@ check_config() { # check the config files for all obvious errors
532
534
fi
533
535
fi
534
536
535
- if [[ " $HAS_HOST " == true ]]; then
537
+ if [[ " $HAS_HOST " == " true" ]]; then
536
538
debug " DNS lookup using host ${d} "
537
539
if [[ " $( host " ${d} " | grep -c -i " ^${d} " ) " -ge 1 ]]; then
538
540
found_ip=true
539
541
fi
540
542
fi
541
543
542
- if [[ " $HAS_NSLOOKUP " == true ]]; then
544
+ if [[ " $HAS_NSLOOKUP " == " true" ]]; then
543
545
debug " DNS lookup using nslookup -query AAAA ${d} "
544
546
if [[ " $( nslookup -query=AAAA " ${d} " | grep -c -i " ^${d} .*has AAAA address" ) " -ge 1 ]]; then
545
547
debug " found IPv6 record for ${d} "
@@ -863,8 +865,7 @@ create_order() {
863
865
dn=0
864
866
for d in $alldomains ; do
865
867
# Convert domain to lowercase as response from server will be in lowercase
866
- # shellcheck disable=SC2018,SC2019
867
- d=$( echo " $d " | tr A-Z a-z)
868
+ d=$( echo " $d " | tr " [:upper:]" " [:lower:]" )
868
869
if [ " $d " == " $authdomain " ]; then
869
870
debug " Saving authorization response for $authdomain for domain alldomains[$dn ]"
870
871
AuthLinkResponse[$dn ]=$response
@@ -1260,7 +1261,7 @@ get_auth_dns() { # get the authoritative dns server for a domain (sets primary_n
1260
1261
fi
1261
1262
fi
1262
1263
1263
- if [[ " $HAS_HOST " == true ]]; then
1264
+ if [[ " $HAS_HOST " == " true" ]]; then
1264
1265
gad_d=" $orig_gad_d "
1265
1266
debug Using " host -t NS" to find primary name server for " $gad_d "
1266
1267
if [[ -z " $gad_s " ]]; then
@@ -1279,7 +1280,7 @@ get_auth_dns() { # get the authoritative dns server for a domain (sets primary_n
1279
1280
fi
1280
1281
fi
1281
1282
1282
- if [[ " $HAS_NSLOOKUP " == true ]]; then
1283
+ if [[ " $HAS_NSLOOKUP " == " true" ]]; then
1283
1284
gad_d=" $orig_gad_d "
1284
1285
debug Using " nslookup -debug -type=soa -type=ns $gad_d $gad_s " to find primary name server
1285
1286
res=$( nslookup -debug -type=soa -type=ns " $gad_d " ${gad_s} )
0 commit comments