Skip to content

Commit

Permalink
triton-dehydrated#40 Sometimes challenge value can start with - which…
Browse files Browse the repository at this point in the history
… severely confuses grep
  • Loading branch information
bahamat authored May 13, 2020
1 parent b8cadeb commit 94df400
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cns-hook-util
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ function waitfortxt {
read -r -a values <<< "$txtval"
for val in "${values[@]}"; do
while [ $count -lt 3 ]; do
dig +short txt "_acme-challenge.${domain}" @${NAMESERVER:-8.8.8.8}
if dig +short txt "_acme-challenge.${domain}" @${NAMESERVER:-8.8.8.8} | grep -w "$val" >/dev/null; then
if dig +short txt "_acme-challenge.${domain}" @${NAMESERVER:-8.8.8.8} | fgrep -- "$val" >/dev/null; then
count=$(($count + 1))
else
count=0
Expand Down

0 comments on commit 94df400

Please sign in to comment.