diff options
Diffstat (limited to 'packages/tinydns/tinydns.inc')
-rw-r--r-- | packages/tinydns/tinydns.inc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/packages/tinydns/tinydns.inc b/packages/tinydns/tinydns.inc index 749fa92d..4f73eee7 100644 --- a/packages/tinydns/tinydns.inc +++ b/packages/tinydns/tinydns.inc @@ -429,6 +429,20 @@ function tinydns_create_zone_file() { conf_mount_ro(); } +function tinydns_sync_on_changes() { + global $g, $config; + $synconchanges = $config['installedpackages']['tinydns']['config'][0]['synconchanges']; + if(!$synconchanges) + return; + $sync_hosts = $config['installedpackages']['tinydnssync']['config']; + foreach($sync_hosts as $sh) { + $sync_to_ip = $sh['ipaddress']; + $password = $sh['password']; + if($password and $sync_to_ip) + tinydns_do_xmlrpc_sync($sync_to_ip, $password); + } +} + function tinydns_do_xmlrpc_sync($sync_to_ip, $password) { global $config, $g; |