Use string instead of Knot template in share/

This commit is contained in:
Miraty 2022-05-03 16:37:28 +02:00
parent ab87c8522c
commit a8af13b781
1 changed files with 3 additions and 2 deletions

View File

@ -24,8 +24,9 @@ if (isset($_POST['domain']) AND isset($_SESSION['username'])) {
$stmt->execute();
$knotZonePath = KNOT_ZONES_PATH . "/" . $_POST['domain'] . "zone";
$knotZone = file_get_contents(NIVER_TEMPLATE_PATH . "/knot.template");
$knotZone = preg_replace("/DOMAIN/", $_POST['domain'], $knotZone);
$knotZone = $_POST['domain'] . ' 3600 SOA ns1.niver.test. admin.niver.test. 1 21600 7200 3628800 3600
' . $_POST['domain'] . ' 86400 NS ns1.niver.test.
';
file_put_contents($knotZonePath, $knotZone);
chmod($knotZonePath, 0660);