149 lines
3.5 KiB
PHP
149 lines
3.5 KiB
PHP
<?php
|
|
exit();
|
|
define("PREFIX", "/malaxe");
|
|
define("ROOT_PATH", "/var/www/niver" . PREFIX);
|
|
define("DB_PATH", ROOT_PATH . "/db/auth.db");
|
|
$suffixes = array(
|
|
/* "atope.art.", */
|
|
|
|
"asso.atope.art.",
|
|
"org.atope.art.",
|
|
"perso.atope.art.",
|
|
"blog.atope.art.",
|
|
"me.atope.art.",
|
|
|
|
"edu.atope.art.",
|
|
"info.atope.art.",
|
|
"wiki.atope.art.",
|
|
"sci.atope.art.",
|
|
|
|
"pol.atope.art.",
|
|
"libre.atope.art.",
|
|
"fem.atope.art.",
|
|
"eco.atope.art.",
|
|
"veg.atope.art.",
|
|
"bio.atope.art.",
|
|
"anar.atope.art.",
|
|
"ancom.atope.art.",
|
|
"acab.atope.art.",
|
|
"handi.atope.art.",
|
|
|
|
"queer.atope.art.",
|
|
"gay.atope.art.",
|
|
"enby.atope.art.",
|
|
"trans.atope.art.",
|
|
|
|
"net.atope.art.",
|
|
"tech.atope.art.",
|
|
"io.atope.art.",
|
|
"sec.atope.art.",
|
|
"cyber.atope.art.",
|
|
"dev.atope.art.",
|
|
"geek.atope.art.",
|
|
"fs.atope.art.",
|
|
"ht.atope.art.",
|
|
"hyper.atope.art.",
|
|
"git.atope.art.",
|
|
"forge.atope.art.",
|
|
"code.atope.art.",
|
|
"lab.atope.art.",
|
|
"labs.atope.art.",
|
|
"gemini.atope.art.",
|
|
"gmi.atope.art.",
|
|
"gemlog.atope.art.",
|
|
"mail.atope.art.",
|
|
"ynh.atope.art.",
|
|
"yuno.atope.art.",
|
|
"sys.atope.art.",
|
|
|
|
"fed.atope.art.",
|
|
"fedi.atope.art.",
|
|
"soc.atope.art.",
|
|
"masto.atope.art.",
|
|
"plero.atope.art.",
|
|
"pix.atope.art.",
|
|
"mobi.atope.art.",
|
|
|
|
"art.atope.art.",
|
|
"music.atope.art.",
|
|
"video.atope.art.",
|
|
"draw.atope.art.",
|
|
"audio.atope.art.",
|
|
"ink.atope.art.",
|
|
|
|
"na.atope.art.",
|
|
"psy.atope.art.",
|
|
"neuro.atope.art.",
|
|
"auti.atope.art.",
|
|
"plur.atope.art.",
|
|
|
|
"blue.atope.art.",
|
|
"red.atope.art.",
|
|
"pink.atope.art.",
|
|
"green.atope.art.",
|
|
"black.atope.art.",
|
|
|
|
"city.atope.art.",
|
|
"town.atope.art.",
|
|
"cafe.atope.art.",
|
|
"home.atope.art.",
|
|
"forum.atope.art.",
|
|
|
|
"dream.atope.art.",
|
|
"space.atope.art.",
|
|
"forest.atope.art.",
|
|
"rain.atope.art.",
|
|
"snow.atope.art.",
|
|
"sun.atope.art.",
|
|
"earth.atope.art.",
|
|
"world.atope.art.",
|
|
"soft.atope.art.",
|
|
"cute.atope.art.",
|
|
"cutie.atope.art.",
|
|
"fun.atope.art.",
|
|
"play.atope.art.",
|
|
"game.atope.art.",
|
|
);
|
|
|
|
foreach ($suffixes as $extension) {
|
|
/*
|
|
$db = new PDO('sqlite:' . DB_PATH);
|
|
$stmt = $db->prepare("INSERT INTO registry(domain, username, last_renewal) VALUES(:domain, :username, :last_renewal)");
|
|
|
|
$time = date("Y-m-d H:i:s");
|
|
$username = "niver";
|
|
$stmt->bindParam(':domain', $extension);
|
|
$stmt->bindParam(':username', $username);
|
|
$stmt->bindParam(':last_renewal', $time);
|
|
|
|
$stmt->execute();
|
|
|
|
echo $extension . "\n";
|
|
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("knotc zone-begin atope.art.");
|
|
exec("knotc zone-set atope.art. " . $extension . " 86400 IN NS ns1.atope.art.");
|
|
exec("knotc zone-set atope.art. " . $extension . " 86400 IN NS ns6.gandi.net.");
|
|
exec("knotc zone-commit atope.art.");
|
|
|
|
exec("knotc conf-begin");
|
|
exec("knotc conf-set 'zone[" . $extension . "]'");
|
|
exec("knotc conf-set 'zone[" . $extension . "].file' '" . $extension . "zone'");
|
|
exec("knotc conf-commit");
|
|
|
|
exec("knotc zone-begin " . $extension);
|
|
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-commit " . $extension);
|
|
*/
|
|
unset($output);
|
|
exec("/usr/sbin/keymgr " . $extension . " ds", $output);
|
|
|
|
$dsRecord = preg_replace("/DS/", "86400 DS", $output[0]);
|
|
|
|
exec("knotc zone-begin atope.art.");
|
|
exec("knotc zone-set atope.art. " . $dsRecord);
|
|
exec("knotc zone-commit atope.art.");
|
|
|
|
}
|