ddns-scripts: cloudflare.com-v4: Fix success check for new response format

JSON response now has spaces between parameters. Accept this new format and the old one.

Signed-off-by: Michael Gray <michael.gray@lantisproject.com>
This commit is contained in:
Michael Gray
2020-04-25 15:34:56 +10:00
parent a2466021cc
commit 0080bb4bba
2 changed files with 2 additions and 2 deletions

View File

@@ -85,7 +85,7 @@ cloudflare_transfer() {
done
# check for error
grep -q '"success":true' $DATFILE || {
grep -q '"success": \?true' $DATFILE || {
write_log 4 "CloudFlare reported an error:"
write_log 7 "$(cat $DATFILE)" # report error
return 1 # HTTP-Fehler