From 8dcf0a577a9d955602e41054f7a8c34f3bc3b283 Mon Sep 17 00:00:00 2001 From: Florian Asche Date: Fri, 25 Apr 2014 18:45:38 +0200 Subject: Update services.inc fix --- etc/inc/services.inc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'etc/inc') diff --git a/etc/inc/services.inc b/etc/inc/services.inc index 1ae1b28..a99cc4d 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -1592,14 +1592,14 @@ function dyndnsCheckIP($int) { // Avoid the long wait for the external check to timeout. if (stristr($gateways_status[$config['interfaces'][$int]['gateway']]['status'],"down")) return "down"; - $hosttocheck = "http://checkip.dyndns.org"; - $ip_ch = curl_init($hosttocheck); + $hosttocheck = "http://checkip.dyndns.org"; + $ip_ch = curl_init($hosttocheck); curl_setopt($ip_ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ip_ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ip_ch, CURLOPT_INTERFACE, $ip_address); - curl_setopt($ip_ch, CURLOPT_CONNECTTIMEOUT, '30'); - curl_setopt($ip_ch, CURLOPT_TIMEOUT, 120); - curl_setopt($ip_ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); + curl_setopt($ip_ch, CURLOPT_CONNECTTIMEOUT, '30'); + curl_setopt($ip_ch, CURLOPT_TIMEOUT, 120); + curl_setopt($ip_ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); $ip_result_page = curl_exec($ip_ch); curl_close($ip_ch); $ip_result_decoded = urldecode($ip_result_page); @@ -1990,7 +1990,6 @@ function services_dnsupdate_process($int = "", $updatehost = "", $forced = false /* determine interface name */ $if = get_real_interface($dnsupdate['interface']); - if (isset($dnsupdate['usepublicip'])) $wanip = dyndnsCheckIP($dnsupdate['interface']); else @@ -2094,7 +2093,7 @@ EOD; @file_put_contents("{$g['varetc_path']}/nsupdatecmds{$i}", $upinst); unset($upinst); /* invoke nsupdate */ - $cmd = "/usr/local/bin/nsupdate -k {$g['varetc_path']}/K{$i}{$keyname}+157+00000.key"; + $cmd = "/usr/bin/nsupdate -k {$g['varetc_path']}/K{$i}{$keyname}+157+00000.key"; if (isset($dnsupdate['usetcp'])) $cmd .= " -v"; $cmd .= " {$g['varetc_path']}/nsupdatecmds{$i}"; -- cgit v1.1