X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=net%2Fddns-scripts%2Ffiles%2Fusr%2Flib%2Fddns%2Fdynamic_dns_functions.sh;h=82f01ca830ac34f2e55b701464f8026410909cb5;hp=07ea4b8ffece3aadc19e4742e732ff089d728f43;hb=a00f9da027cf5db527eaf6605240f1d9bc87f35a;hpb=f747dcefdfec315563f349da4d625d9cfcaa84ad diff --git a/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_functions.sh b/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_functions.sh index 07ea4b8ffe..82f01ca830 100644 --- a/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_functions.sh +++ b/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_functions.sh @@ -53,7 +53,7 @@ get_current_ip() { #if ip source is not defined, assume we want to get ip from wan - if [ "$ip_source" != "interface" ] && [ "$ip_source" != "web" ] + if [ "$ip_source" != "interface" ] && [ "$ip_source" != "web" ] && [ "$ip_source" != "script" ] then ip_source="network" ip_network="wan" @@ -74,6 +74,10 @@ get_current_ip() if [ "$ip_source" = "network" ] || [ "$ip_source" = "interface" ] then current_ip=$(ifconfig $ip_interface | grep -o 'inet addr:[0-9.]*' | grep -o "$ip_regex") + elif [ "$ip_source" = "script" ] + then + # get ip from script + current_ip=$($ip_script) else # get ip from web # we check each url in order in ip_url variable, and if no ips are found we use dyndns ip checker