aboutsummaryrefslogtreecommitdiffstats
path: root/packages/tinydns/tinydns.inc
diff options
context:
space:
mode:
Diffstat (limited to 'packages/tinydns/tinydns.inc')
-rw-r--r--packages/tinydns/tinydns.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/tinydns/tinydns.inc b/packages/tinydns/tinydns.inc
index d270171d..cc4371fa 100644
--- a/packages/tinydns/tinydns.inc
+++ b/packages/tinydns/tinydns.inc
@@ -153,6 +153,8 @@ function tinydns_setup_ping_items() {
global $g, $config;
if(!$config['installedpackages']['tinydnsdomains'])
return;
+ $wanif = get_real_wan_interface();
+ $ip = find_interface_ip($wanif);
conf_mount_rw();
/* XXX: make this work with other packages */
$fd = fopen("/var/db/pkgpinghosts", "w");
@@ -164,10 +166,10 @@ function tinydns_setup_ping_items() {
* status and create a database of the status information that we can use.
*/
foreach($config['installedpackages']['tinydnsdomains']['config'] as $domain) {
- fwrite($fd, $domain['ipaddress'] . "\n");
+ fwrite($fd, $ip . "|" . $domain['ipaddress'] . "|3|/usr/local/pkg/tinydns_down.php|/usr/local/pkg/tinydns_up.php\n");
if($domain['row']) {
foreach($domain['row'] as $row) {
- fwrite($fd, $row['ipaddress'] . "\n");
+ fwrite($fd, $ip . "|" . $row['ipaddress'] . "|3|/usr/local/pkg/tinydns_down.php|/usr/local/pkg/tinydns_up.php\n");
}
}
}