From f113ef9068aea8af863e3bfda1454388558bc798 Mon Sep 17 00:00:00 2001 From: Daniel Stefan Haischt Date: Sat, 1 Sep 2007 06:30:15 +0000 Subject: * added remaining DTDs --- packages/powerdns.xml | 125 +++++++++++++++++++++++++------------------------- 1 file changed, 63 insertions(+), 62 deletions(-) (limited to 'packages/powerdns.xml') diff --git a/packages/powerdns.xml b/packages/powerdns.xml index 6cd8734b..214da5f4 100644 --- a/packages/powerdns.xml +++ b/packages/powerdns.xml @@ -1,4 +1,5 @@ + @@ -47,8 +48,8 @@ powerdns 2.9.16_4 Services: PowerDNS - true yes + true PowerDNS @@ -73,16 +74,16 @@ IP Address ipaddress + (0.0.0.0 to bind to all) input 0.0.0.0 - (0.0.0.0 to bind to all) Cache Time to Live cachettl + Recommended value: 20 input 20 - Recommended value: 20 Master @@ -103,65 +104,6 @@ - - system("/usr/local/bin/pg_ctl -m immediate"); - rmdir_recursive("/usr/local/pgsql"); - system("/usr/sbin/pw userdel pgsql"); - system("/usr/bin/killall -9 postgres"); - echo "<p>"; - echo "Reboot required... One moment..."; - echo "<p>"; - /* system("/sbin/shutdown -r now"); */ - - - echo "<pre>"; - echo "Creating DB..."; - system("/usr/bin/su -l pgsql -c initdb"); - system("/usr/local/etc/rc.d/010.pgsql.sh start"); - system("/usr/bin/su -l pgsql -c \"dropdb powerdns\" "); - system("/usr/bin/su -l pgsql -c \"createdb powerdns\" "); - $fout = fopen("/usr/local/pkg/powerdns.schema","w"); - /* DATABASE SCHEMA */ - fwrite($fout, "create table domains (\n"); - fwrite($fout, "id SERIAL PRIMARY KEY,\n"); - fwrite($fout, "name VARCHAR(255) NOT NULL,\n"); - fwrite($fout, "master VARCHAR(20) DEFAULT NULL,\n"); - fwrite($fout, "last_check INT DEFAULT NULL,\n"); - fwrite($fout, "type VARCHAR(6) NOT NULL,\n"); - fwrite($fout, "notified_serial INT DEFAULT NULL,\n"); - fwrite($fout, "account VARCHAR(40) DEFAULT NULL\n"); - fwrite($fout, ");\n"); - fwrite($fout, "CREATE UNIQUE INDEX name_index ON domains(name);\n"); - fwrite($fout, "CREATE TABLE records (\n"); - fwrite($fout, " id SERIAL PRIMARY KEY,\n"); - fwrite($fout, " domain_id INT DEFAULT NULL,\n"); - fwrite($fout, " name VARCHAR(255) DEFAULT NULL,\n"); - fwrite($fout, " type VARCHAR(6) DEFAULT NULL,\n"); - fwrite($fout, " content VARCHAR(255) DEFAULT NULL,\n"); - fwrite($fout, " ttl INT DEFAULT NULL,\n"); - fwrite($fout, " prio INT DEFAULT NULL,\n"); - fwrite($fout, " change_date INT DEFAULT NULL,\n"); - fwrite($fout, " CONSTRAINT domain_exists\n"); - fwrite($fout, " FOREIGN KEY(domain_id) REFERENCES domains(id)\n"); - fwrite($fout, " ON DELETE CASCADE\n"); - fwrite($fout, ");\n"); - fwrite($fout, "CREATE INDEX rec_name_index ON records(name);\n"); - fwrite($fout, "CREATE INDEX nametype_index ON records(name,type);\n"); - fwrite($fout, "CREATE INDEX domain_id ON records(domain_id);\n"); - fwrite($fout, "create table supermasters (\n"); - fwrite($fout, " ip VARCHAR(25) NOT NULL,\n"); - fwrite($fout, " nameserver VARCHAR(255) NOT NULL,\n"); - fwrite($fout, " account VARCHAR(40) DEFAULT NULL\n"); - fwrite($fout, ");\n"); - fwrite($fout, "GRANT SELECT ON supermasters TO pgsql;\n"); - fwrite($fout, "GRANT ALL ON domains TO pgsql;\n"); - fwrite($fout, "GRANT ALL ON domains_id_seq TO pgsql;\n"); - fwrite($fout, "GRANT ALL ON records TO pgsql;\n"); - fwrite($fout, "GRANT ALL ON records_id_seq TO pgsql;\n"); - fclose($fout); - system("cat /usr/local/pkg/powerdns.schema | /usr/bin/su -l pgsql -c \"psql powerdns\" "); - echo "Installation completed!"; - if($password == $passwordagain) { conf_mount_rw(); @@ -244,4 +186,63 @@ exit; } + + echo "<pre>"; + echo "Creating DB..."; + system("/usr/bin/su -l pgsql -c initdb"); + system("/usr/local/etc/rc.d/010.pgsql.sh start"); + system("/usr/bin/su -l pgsql -c \"dropdb powerdns\" "); + system("/usr/bin/su -l pgsql -c \"createdb powerdns\" "); + $fout = fopen("/usr/local/pkg/powerdns.schema","w"); + /* DATABASE SCHEMA */ + fwrite($fout, "create table domains (\n"); + fwrite($fout, "id SERIAL PRIMARY KEY,\n"); + fwrite($fout, "name VARCHAR(255) NOT NULL,\n"); + fwrite($fout, "master VARCHAR(20) DEFAULT NULL,\n"); + fwrite($fout, "last_check INT DEFAULT NULL,\n"); + fwrite($fout, "type VARCHAR(6) NOT NULL,\n"); + fwrite($fout, "notified_serial INT DEFAULT NULL,\n"); + fwrite($fout, "account VARCHAR(40) DEFAULT NULL\n"); + fwrite($fout, ");\n"); + fwrite($fout, "CREATE UNIQUE INDEX name_index ON domains(name);\n"); + fwrite($fout, "CREATE TABLE records (\n"); + fwrite($fout, " id SERIAL PRIMARY KEY,\n"); + fwrite($fout, " domain_id INT DEFAULT NULL,\n"); + fwrite($fout, " name VARCHAR(255) DEFAULT NULL,\n"); + fwrite($fout, " type VARCHAR(6) DEFAULT NULL,\n"); + fwrite($fout, " content VARCHAR(255) DEFAULT NULL,\n"); + fwrite($fout, " ttl INT DEFAULT NULL,\n"); + fwrite($fout, " prio INT DEFAULT NULL,\n"); + fwrite($fout, " change_date INT DEFAULT NULL,\n"); + fwrite($fout, " CONSTRAINT domain_exists\n"); + fwrite($fout, " FOREIGN KEY(domain_id) REFERENCES domains(id)\n"); + fwrite($fout, " ON DELETE CASCADE\n"); + fwrite($fout, ");\n"); + fwrite($fout, "CREATE INDEX rec_name_index ON records(name);\n"); + fwrite($fout, "CREATE INDEX nametype_index ON records(name,type);\n"); + fwrite($fout, "CREATE INDEX domain_id ON records(domain_id);\n"); + fwrite($fout, "create table supermasters (\n"); + fwrite($fout, " ip VARCHAR(25) NOT NULL,\n"); + fwrite($fout, " nameserver VARCHAR(255) NOT NULL,\n"); + fwrite($fout, " account VARCHAR(40) DEFAULT NULL\n"); + fwrite($fout, ");\n"); + fwrite($fout, "GRANT SELECT ON supermasters TO pgsql;\n"); + fwrite($fout, "GRANT ALL ON domains TO pgsql;\n"); + fwrite($fout, "GRANT ALL ON domains_id_seq TO pgsql;\n"); + fwrite($fout, "GRANT ALL ON records TO pgsql;\n"); + fwrite($fout, "GRANT ALL ON records_id_seq TO pgsql;\n"); + fclose($fout); + system("cat /usr/local/pkg/powerdns.schema | /usr/bin/su -l pgsql -c \"psql powerdns\" "); + echo "Installation completed!"; + + + system("/usr/local/bin/pg_ctl -m immediate"); + rmdir_recursive("/usr/local/pgsql"); + system("/usr/sbin/pw userdel pgsql"); + system("/usr/bin/killall -9 postgres"); + echo "<p>"; + echo "Reboot required... One moment..."; + echo "<p>"; + /* system("/sbin/shutdown -r now"); */ + -- cgit v1.2.3