diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-01-30 00:57:26 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-01-30 00:57:26 +0000 |
commit | 4940ca0e9525c3fd5e194faa997c7bf3db82784e (patch) | |
tree | 97d0468152a407d02bd73a5702e10c6e83af7d04 | |
parent | 3d6bb8162cd01f71d733119719771c91bc1fcfc9 (diff) | |
download | pfsense-packages-4940ca0e9525c3fd5e194faa997c7bf3db82784e.tar.gz pfsense-packages-4940ca0e9525c3fd5e194faa997c7bf3db82784e.tar.bz2 pfsense-packages-4940ca0e9525c3fd5e194faa997c7bf3db82784e.zip |
Ensure tinydns user and group exists upon installation.
-rw-r--r-- | packages/tinydns/tinydns.inc | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/packages/tinydns/tinydns.inc b/packages/tinydns/tinydns.inc index c59923c5..a2bb66bc 100644 --- a/packages/tinydns/tinydns.inc +++ b/packages/tinydns/tinydns.inc @@ -111,6 +111,9 @@ EOD; fclose($fd); conf_mount_ro(); filter_configure(); + + tinydns_custom_php_changeip_command(); + exec("/usr/local/etc/rc.d/svscan.sh start"); } @@ -141,7 +144,7 @@ function tinydns_custom_php_changeip_command() { $dnscacheip = $ip; $dnsuserip = $arr[0]; -/* For now force $dnsserverip to to 127.0.0.1 unless a separate IP is specified */ + /* For now force $dnsserverip to to 127.0.0.1 unless a separate IP is specified */ $localhost = "127.0.0.1"; $dnsserverip = $localhost; if($config['installedpackages']['tinydns']['config'][0]['ipaddress'] != $localhost AND $config['installedpackages']['tinydns']['config'][0]['ipaddress'] != "") @@ -153,13 +156,15 @@ function tinydns_custom_php_changeip_command() { $updatecron = $config['installedpackages']['tinydns']['config'][0]['updatecron']; /* setup daemon tools service area */ - if(!is_dir("/service")) exec("/bin/mkdir /service"); - if(!is_dir("/service/tinydns/root")){ - exec("/usr/sbin/pw useradd Gtinydns"); - exec("/usr/sbin/pw useradd Gdnslog"); - exec("/usr/local/bin/tinydns-conf Gtinydns Gdnslog /etc/tinydns {$dnsserverip}"); - exec("/bin/ln -s /etc/tinydns /service/"); - } + if(!is_dir("/service")) + exec("/bin/mkdir /service"); + + exec("/usr/sbin/pw useradd Gtinydns"); + exec("/usr/sbin/pw useradd Gdnslog"); + + exec("/usr/local/bin/tinydns-conf Gtinydns Gdnslog /etc/tinydns {$dnsserverip}"); + exec("/bin/ln -s /etc/tinydns /service/"); + exec("echo {$dnsserverip} > /etc/tinydns/env/IP"); exec("/usr/bin/killall -9 tinydns"); |