diff --git a/src/Controller/DomainController.php b/src/Controller/DomainController.php index 7750ba6..f0a0f33 100644 --- a/src/Controller/DomainController.php +++ b/src/Controller/DomainController.php @@ -35,29 +35,7 @@ class DomainController $this->zoneCachePath = '/var/cache/bind/'; } - /* - /** - * @param String $name - * @param mixed $a - * @param mixed $aaaa - * - * @return void - public function createZone(string $name, mixed $a, mixed $aaaa): void - { - $this->createZoneFile(name: $name, a: $a, aaaa: $aaaa); -/* - $zoneFilename = $this->localZonesDir . $name; - echo $zoneFilename . PHP_EOL; - - if ($localZones = fopen(filename: $this->localZoneFile, mode: 'a')) { - fputs(stream: $localZones, data: "include \"$zoneFilename\";" . PHP_EOL); - fclose(stream: $localZones); - } else { - echo "Error writing to $this->localZoneFile, check permissions"; - exit(1); - } - } - */ + function createIncludeFile() { @@ -73,7 +51,7 @@ class DomainController } fclose(stream: $oFile); - // TODO rndc reload + exec(command: '/usr/sbin/rndc reload'); } @@ -262,12 +240,12 @@ class DomainController ] ); } - - + + /** - * @param String $panel + * @param array $ip * - * @return false|string + * @return String */ function createIPContent(array $ip): String {