aboutsummaryrefslogtreecommitdiffstats
path: root/packages/tinydns/tinydns.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-12-07 17:59:37 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-12-07 17:59:37 +0000
commitd438d535e8c180e10ca4d6fcd78f2b4ae95880e6 (patch)
treef94daeccf5cc6b880af5a6477a5934a30a93fdd7 /packages/tinydns/tinydns.inc
parentec6461ff27742fec0deb9a8edde135f226d57899 (diff)
downloadpfsense-packages-d438d535e8c180e10ca4d6fcd78f2b4ae95880e6.tar.gz
pfsense-packages-d438d535e8c180e10ca4d6fcd78f2b4ae95880e6.tar.bz2
pfsense-packages-d438d535e8c180e10ca4d6fcd78f2b4ae95880e6.zip
Continue framing TinyDNS for testing
Diffstat (limited to 'packages/tinydns/tinydns.inc')
-rw-r--r--packages/tinydns/tinydns.inc33
1 files changed, 31 insertions, 2 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