mirror of
https://github.com/openwrt/packages.git
synced 2026-05-31 06:51:51 +08:00
ddns-scripts: netcup.com use json_load_file
Replace manual file loading via cat with json_load_file for parsing
JSON data. This uses the intended helper function and improves
code clarity and robustness.
Signed-off-by: Tim Flubshi <flubshi@gmail.com>
(cherry picked from commit bd6a551669)
This commit is contained in:
committed by
Florian Eckert
parent
9ec9a2c70b
commit
f168b37807
@@ -127,7 +127,7 @@ netcup_check_response() {
|
||||
local __context="$1"
|
||||
local __status __statuscode __shortmsg
|
||||
|
||||
json_load "$(cat "$DATFILE")"
|
||||
json_load_file "$DATFILE"
|
||||
json_get_var __status "status"
|
||||
json_get_var __statuscode "statuscode"
|
||||
json_get_var __shortmsg "shortmessage"
|
||||
|
||||
Reference in New Issue
Block a user