mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 21:24:31 +04:00
ddns-script: add retry_max_count's upgrade script
Signed-off-by: FriesI23 Qin <FriesI23@outlook.com>
This commit is contained in:
committed by
Florian Eckert
parent
6e80b3ac66
commit
f02a1df129
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
upgrade_to_retry_max_count() {
|
||||
local service=$1
|
||||
local retry_count retry_max_count
|
||||
|
||||
config_get retry_max_count $service retry_max_count
|
||||
config_get retry_count $service retry_count
|
||||
if [ -z "$retry_max_count" ] && [ -n "$retry_count" ]; then
|
||||
uci_set ddns $service retry_max_count $retry_count
|
||||
uci_commit ddns
|
||||
fi
|
||||
}
|
||||
|
||||
config_load ddns
|
||||
config_foreach upgrade_to_retry_max_count service
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user