mirror of
https://github.com/itdoginfo/podkop.git
synced 2026-01-27 04:40:37 +03:00
chore: extract outbound section check into _check_outbound_section and call it via config_foreach
This commit is contained in:
@@ -79,10 +79,7 @@ check_requirements() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
has_outbound_section() {
|
_check_outbound_section() {
|
||||||
local section_exists=1
|
|
||||||
|
|
||||||
check_section() {
|
|
||||||
local section="$1"
|
local section="$1"
|
||||||
local proxy_string interface outbound_json urltest_proxy_links
|
local proxy_string interface outbound_json urltest_proxy_links
|
||||||
|
|
||||||
@@ -97,7 +94,10 @@ has_outbound_section() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
config_foreach check_section "section"
|
has_outbound_section() {
|
||||||
|
local section_exists=1
|
||||||
|
|
||||||
|
config_foreach _check_outbound_section "section"
|
||||||
|
|
||||||
return $section_exists
|
return $section_exists
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user