diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-10-24 17:40:38 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-10-24 17:40:38 +0000 |
commit | 7718003a1846b9e78c2d3afefacccd0084e5201e (patch) | |
tree | cd999effa28493dadc1584935da32599436fca8e /packages/tinydns/tinydns.inc | |
parent | 21cfa61cde0eeb323a58324b8bd79382d263c300 (diff) | |
download | pfsense-packages-7718003a1846b9e78c2d3afefacccd0084e5201e.tar.gz pfsense-packages-7718003a1846b9e78c2d3afefacccd0084e5201e.tar.bz2 pfsense-packages-7718003a1846b9e78c2d3afefacccd0084e5201e.zip |
Add a automatically sync field (checkbox)
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; |