aboutsummaryrefslogtreecommitdiffstats
path: root/packages/tinydns
diff options
context:
space:
mode:
Diffstat (limited to 'packages/tinydns')
-rw-r--r--packages/tinydns/tinydns.inc33
-rw-r--r--packages/tinydns/tinydns.xml10
2 files changed, 35 insertions, 8 deletions
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 @@
<include_file>/usr/local/pkg/tinydns.inc</include_file>
<fields>
<field>
- <fieldname>active_interface</fieldname>
- <fielddescr>Proxy interface</fielddescr>
- <description>The interface(s) the proxy server will bind to.</description>
- <default_value>lan</default_value>
+ <fieldname>IP Address</fieldname>
+ <fielddescr>TinyDNS listen IP address</fielddescr>
+ <description>The IP address that TinyDNS will bind to.</description>
+ <default_value>ip</default_value>
<required/>
- <type>interfaces_selection</type>
- <multiple/>
</field>
</fields>
</packagegui>