From d438d535e8c180e10ca4d6fcd78f2b4ae95880e6 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Thu, 7 Dec 2006 17:59:37 +0000 Subject: Continue framing TinyDNS for testing --- packages/tinydns/tinydns.inc | 33 +++++++++++++++++++++++++++++++-- packages/tinydns/tinydns.xml | 10 ++++------ 2 files changed, 35 insertions(+), 8 deletions(-) (limited to 'packages/tinydns') diff --git a/packages/tinydns/tinydns.inc b/packages/tinydns/tinydns.inc index 99fd6af5..38aa33b9 100644 --- a/packages/tinydns/tinydns.inc +++ b/packages/tinydns/tinydns.inc @@ -30,11 +30,40 @@ */ function tinydns_custom_php_install_command() { - + global $g, $config; + conf_mount_rw(); + /* setup daemon tools service area */ + exec("pw useradd Gtinydns"); + exec("pw useradd Gdnslog"); + conf_mount_ro(); } function tinydns_custom_php_deinstall_command() { - + global $g, $config; + conf_mount_rw(); + /* destroyh all daemontools items */ + exec("pw userdelete Gtinydns"); + exec("pw userdelete Gdnslog"); + conf_mount_ro(); +} + +function tinydns_custom_php_changeip_command() { + global $g, $config; + conf_mount_rw(); + $ip = $config['installedpackages']['tinydns']['ip']; + exec("tinydns-conf Gtinydns Gdnslog /etc/tinydns {$ip}"); + exec("ln -s /etc/tinydns /service"); + sleep(5); + exec("svstat /service/tinydns"); + conf_mount_ro(); +} + +function tinydns_create_zone_file() { + $fd = fopen("/service/tinydns/root/data", "w"); + global $g, $config; + conf_mount_rw(); + + conf_mount_ro(); } ?> \ No newline at end of file diff --git a/packages/tinydns/tinydns.xml b/packages/tinydns/tinydns.xml index 0b306755..6d7d8245 100644 --- a/packages/tinydns/tinydns.xml +++ b/packages/tinydns/tinydns.xml @@ -23,13 +23,11 @@ /usr/local/pkg/tinydns.inc - active_interface - Proxy interface - The interface(s) the proxy server will bind to. - lan + IP Address + TinyDNS listen IP address + The IP address that TinyDNS will bind to. + ip - interfaces_selection - -- cgit v1.2.3