|
Revision 724, 1.9 kB
(checked in by anarcat, 3 years ago)
|
[project @ Big work on BIND interaction]
Big work on BIND interaction
Big work on BIND interaction :
- do_domaines.sh was mostly rewritten, and is now named update_domains.sh
- templates used to build automatic.conf and zone files are now in
/etc/bind/templates once installed
- automatic.conf and slaveip.conf are now generated in /var/alternc/bind
- zone fils are now generated in /var/alternc/bind/zones.
- Renames :
/etc/bind/domaines.template -> /etc/bind/templates/named.template
/etc/bind/master/domaines.template -> /etc/bind/templates/zone.template * Gone (unused) :
/etc/bind/master/mx.template
/etc/bind/master/slave.template
/etc/bind/master
- The Debian preinst script take cares of moving updating file locations
ONETIME_FILES was removed from alternc.install :
- postfix's header_checks and body_checks are copied only once by
alternc.install, and have been move from /etc/alternc/templates
(there was no macro expansion anyway)
- /var/alternc/bind/automatic.conf is now generated empty if it doesn't
exists
- /var/alternc/bind/slaveip.conf is now generated by alternc.install
calling the slave_dns script.
Other fixes in alternc.install :
- The tar used to check for installed files modifications now redirect
errors to /dev/null
- Reorganized to group small things together
Original author: lunar@anargeek.net
Date: 2005-09-06 18:57:06
|
| Line | |
|---|
| 1 |
#!/usr/bin/php4 -q |
|---|
| 2 |
<?php |
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 |
$FLAGFILE="/var/run/alternc/refresh_slave"; |
|---|
| 35 |
|
|---|
| 36 |
if (file_exists($FLAGFILE)) { |
|---|
| 37 |
unlink($FLAGFILE); |
|---|
| 38 |
include("/var/alternc/bureau/class/local.php"); |
|---|
| 39 |
mysql_connect($L_MYSQL_HOST,$L_MYSQL_LOGIN,$L_MYSQL_PWD); |
|---|
| 40 |
mysql_select_db($L_MYSQL_DATABASE); |
|---|
| 41 |
$r=mysql_query("SELECT * FROM slaveip"); |
|---|
| 42 |
$f=fopen("/var/alternc/bind/slaveip.conf","wb"); |
|---|
| 43 |
fputs($f," |
|---|
| 44 |
// DO NOT EDIT THIS FILE, IT WILL BE OVERWRITTEN |
|---|
| 45 |
// Use the AlternC managment console instead. |
|---|
| 46 |
acl \"allslaves\" { |
|---|
| 47 |
{ |
|---|
| 48 |
127.0.0.1; // myself, just to be sure |
|---|
| 49 |
"); |
|---|
| 50 |
while ($c=mysql_fetch_array($r)) { |
|---|
| 51 |
fputs($f,$c['ip']."/".$c['class'].";\n"); |
|---|
| 52 |
} |
|---|
| 53 |
fputs($f,"};\n};\n"); |
|---|
| 54 |
fclose($f); |
|---|
| 55 |
exec("/etc/init.d/bind9 reload"); |
|---|
| 56 |
} |
|---|
| 57 |
|
|---|
| 58 |
|
|---|