mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 23:34:31 +04:00
ddns-scripts: refactor start_daemon_for_all_ddns_sections()
Removed redundant if else condition. updater is launched with the same verbosity value anyway. Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This commit is contained in:
committed by
Florian Eckert
parent
99da7eded2
commit
a361672882
@@ -184,20 +184,14 @@ load_all_service_sections() {
|
|||||||
# and by /etc/init.d/ddns start
|
# and by /etc/init.d/ddns start
|
||||||
start_daemon_for_all_ddns_sections()
|
start_daemon_for_all_ddns_sections()
|
||||||
{
|
{
|
||||||
local __EVENTIF="$1"
|
local event_if sections section_id configured_if
|
||||||
local __SECTIONS=""
|
event_if="$1"
|
||||||
local __SECTIONID=""
|
|
||||||
local __IFACE=""
|
|
||||||
|
|
||||||
load_all_service_sections __SECTIONS
|
load_all_service_sections sections
|
||||||
for __SECTIONID in $__SECTIONS; do
|
for section_id in $sections; do
|
||||||
config_get __IFACE "$__SECTIONID" interface "wan"
|
config_get configured_if "$section_id" interface "wan"
|
||||||
[ -z "$__EVENTIF" -o "$__IFACE" = "$__EVENTIF" ] || continue
|
[ -z "$event_if" ] || [ "$configured_if" = "$event_if" ] || continue
|
||||||
if [ $VERBOSE -eq 0 ]; then # start in background
|
/usr/lib/ddns/dynamic_dns_updater.sh -v "$VERBOSE" -S "$section_id" -- start
|
||||||
/usr/lib/ddns/dynamic_dns_updater.sh -v 0 -S "$__SECTIONID" -- start &
|
|
||||||
else
|
|
||||||
/usr/lib/ddns/dynamic_dns_updater.sh -v "$VERBOSE" -S "$__SECTIONID" -- start
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user