|
@@ -2,9 +2,8 @@
|
|
define("PREFIX", "/malaxe");
|
|
define("PREFIX", "/malaxe");
|
|
define("ROOT_PATH", "/var/www/niver" . PREFIX);
|
|
define("ROOT_PATH", "/var/www/niver" . PREFIX);
|
|
define("DB_PATH", ROOT_PATH . "/db/auth.db");
|
|
define("DB_PATH", ROOT_PATH . "/db/auth.db");
|
|
-
|
|
|
|
$suffixes = array(
|
|
$suffixes = array(
|
|
- "atope.art.",
|
|
|
|
|
|
+ /* "atope.art.", */
|
|
|
|
|
|
"asso.atope.art.",
|
|
"asso.atope.art.",
|
|
"org.atope.art.",
|
|
"org.atope.art.",
|
|
@@ -106,6 +105,7 @@ $suffixes = array(
|
|
);
|
|
);
|
|
|
|
|
|
foreach ($suffixes as $extension) {
|
|
foreach ($suffixes as $extension) {
|
|
|
|
+ /*
|
|
$db = new PDO('sqlite:' . DB_PATH);
|
|
$db = new PDO('sqlite:' . DB_PATH);
|
|
$stmt = $db->prepare("INSERT INTO registry(domain, username, last_renewal) VALUES(:domain, :username, :last_renewal)");
|
|
$stmt = $db->prepare("INSERT INTO registry(domain, username, last_renewal) VALUES(:domain, :username, :last_renewal)");
|
|
|
|
|
|
@@ -116,7 +116,7 @@ foreach ($suffixes as $extension) {
|
|
$stmt->bindParam(':last_renewal', $time);
|
|
$stmt->bindParam(':last_renewal', $time);
|
|
|
|
|
|
$stmt->execute();
|
|
$stmt->execute();
|
|
- /*
|
|
|
|
|
|
+
|
|
echo $extension . "\n";
|
|
echo $extension . "\n";
|
|
exec("cp /var/lib/knot/zones/template /var/lib/knot/zones/" . $extension . "zone");
|
|
exec("cp /var/lib/knot/zones/template /var/lib/knot/zones/" . $extension . "zone");
|
|
exec("sed -i 's/maison.atope.art./" . $extension . "/g' /var/lib/knot/zones/" . $extension . "zone");
|
|
exec("sed -i 's/maison.atope.art./" . $extension . "/g' /var/lib/knot/zones/" . $extension . "zone");
|
|
@@ -135,14 +135,14 @@ foreach ($suffixes as $extension) {
|
|
exec("knotc zone-set " . $extension . " " . $extension . " 86400 IN NS ns1.atope.art.");
|
|
exec("knotc zone-set " . $extension . " " . $extension . " 86400 IN NS ns1.atope.art.");
|
|
exec("knotc zone-set " . $extension . " " . $extension . " 86400 IN NS ns6.gandi.net.");
|
|
exec("knotc zone-set " . $extension . " " . $extension . " 86400 IN NS ns6.gandi.net.");
|
|
exec("knotc zone-commit " . $extension);
|
|
exec("knotc zone-commit " . $extension);
|
|
-
|
|
|
|
|
|
+*/
|
|
unset($output);
|
|
unset($output);
|
|
exec("/usr/sbin/keymgr " . $extension . " ds", $output);
|
|
exec("/usr/sbin/keymgr " . $extension . " ds", $output);
|
|
|
|
|
|
$dsRecord = preg_replace("/DS/", "86400 DS", $output[0]);
|
|
$dsRecord = preg_replace("/DS/", "86400 DS", $output[0]);
|
|
|
|
|
|
- exec("knotc zone-begin " . $extension);
|
|
|
|
- exec("knotc zone-set " . $extension . " " . $dsRecord);
|
|
|
|
- exec("knotc zone-commit " . $extension);
|
|
|
|
- */
|
|
|
|
|
|
+ exec("knotc zone-begin atope.art.");
|
|
|
|
+ exec("knotc zone-set atope.art. " . $dsRecord);
|
|
|
|
+ exec("knotc zone-commit atope.art.");
|
|
|
|
+
|
|
}
|
|
}
|