ddns-scripts: cloudflare.com-v4: Fix success check for new response format 11955/head
authorMichael Gray <michael.gray@lantisproject.com>
Sat, 25 Apr 2020 05:34:56 +0000 (15:34 +1000)
committerMichael Gray <michael.gray@lantisproject.com>
Sat, 25 Apr 2020 07:36:51 +0000 (17:36 +1000)
JSON response now has spaces between parameters. Accept this new format and the old one.

Signed-off-by: Michael Gray <michael.gray@lantisproject.com>
net/ddns-scripts/Makefile
net/ddns-scripts/files/update_cloudflare_com_v4.sh

index fe634882d5b92eeeb4b2e68a03fb3234186d050d..6886b4ac217aced9fcc9eb4b77961e955a463d29 100755 (executable)
@@ -12,7 +12,7 @@ PKG_NAME:=ddns-scripts
 PKG_VERSION:=2.7.8
 # Release == build
 # increase on changes of services files or tld_names.dat
-PKG_RELEASE:=17
+PKG_RELEASE:=18
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=
index dbf6f592bfba7dc0c2432402c72ef19b8c7f5608..7e663ac424d489b47d368911228018c1eef27bd5 100755 (executable)
@@ -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