aboutsummaryrefslogtreecommitdiffstats
path: root/packages/tinydns/tinydns.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-10-24 17:40:38 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-10-24 17:40:38 +0000
commit7718003a1846b9e78c2d3afefacccd0084e5201e (patch)
treecd999effa28493dadc1584935da32599436fca8e /packages/tinydns/tinydns.inc
parent21cfa61cde0eeb323a58324b8bd79382d263c300 (diff)
downloadpfsense-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.inc14
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;