Closed scenix007 closed 2 years ago
I've taken a quick look at your changes, and I have the following concerns.
Thanks for your effort here, but I have to be cautious about changes as this can affect the network infrastructure of other users.
I should add I'm NOT running on RT-AX86U, so it could be something specific to that router. If other RT-AX86U users can confirm there is a bug here, please let me know. Also let me know if there's no bug.
Thank you for your reply.
1 . The error message is only one line both when I run ./cloudflare_ddns list
and ./cloudflare_ddns 1.1.1.1
:
line 119: syntax error: unexpected end of file (expecting "}")`
After switching to the -H formatting, the error disappeared and the script worked (except for the threshold part).
CLOUDFLARE_AUTH_HEADERS
always gets an empty string no matter how I remove the API_TOKEN from the config file.#if [ -n $CLOUDFLARE_API_TOKEN ]; then
# CLOUDFLARE_AUTH_HEADERS="Authorization: Bearer $CLOUDFLARE_API_TOKEN"
#fi
Somehow the -n
phrase always returns true
in my case...
Also, there's no need for you to consider accepting my pull request, I just find it is easy to express my idea through a pull request, feel free to reject it if you want.
I've taken a second look at this. I appreciate your work on improving the script, but I'm not able to reproduce the error you described, so I can't justify modifying the script. No one else has complained of a similar error, either. I do like that you avoid the nested command substitutions in the last_run_time code, but it's too small an improvement in readability for the risk of impacting the throttling code. This is especially true since your change appears to have ignored THROTTLED log entries.
Rejecting this pull for now, but I'll keep a look out for problems along the lines you described. Thanks.
Curl header formatting and last_run_time logic
Tested Env
RT-AX86U , Asuswrt-Merlin version: 386.3 Curl info: