Compare commits
No commits in common. "1b183fe626f584ab5bc022a009659c7c6cc33d4d" and "a3b8de848e9c92c17d38f978bdc42705b7236544" have entirely different histories.
1b183fe626
...
a3b8de848e
|
@ -1,9 +0,0 @@
|
||||||
1.0.0 (2022-03-01)
|
|
||||||
- official release
|
|
||||||
|
|
||||||
rc2 (2022-02-27)
|
|
||||||
- updated documentation, minor fixes
|
|
||||||
- fixed some optical issues.
|
|
||||||
|
|
||||||
0.99-rc1 (2022-02-22)
|
|
||||||
- initial rc
|
|
|
@ -144,8 +144,8 @@ class BindAPI
|
||||||
echo COLOR_YELLOW . "check" . COLOR_DEFAULT . "\t health checks the system can perform" . PHP_EOL;
|
echo COLOR_YELLOW . "check" . COLOR_DEFAULT . "\t health checks the system can perform" . PHP_EOL;
|
||||||
echo COLOR_GREEN . "\t check:permissions" . PHP_EOL;
|
echo COLOR_GREEN . "\t check:permissions" . PHP_EOL;
|
||||||
echo COLOR_GREEN . "\t check:panels {ID} {fix=yes}" . PHP_EOL;
|
echo COLOR_GREEN . "\t check:panels {ID} {fix=yes}" . PHP_EOL;
|
||||||
echo COLOR_GREEN . "\t check:domains" . PHP_EOL;
|
echo COLOR_GREEN . "\t check:domains {ID} {fix=yes}" . PHP_EOL;
|
||||||
echo COLOR_GREEN . "\t check:showincludes" . COLOR_DEFAULT . " Temporary needed until KeyHelp 22.1" . PHP_EOL;
|
echo COLOR_GREEN . "\t check:showinclude" . COLOR_DEFAULT . " Temporary needed until KeyHelp 22.1" . PHP_EOL;
|
||||||
|
|
||||||
|
|
||||||
echo COLOR_YELLOW . "panels" . COLOR_DEFAULT . "\t all Keyhelp systems configured" . PHP_EOL;
|
echo COLOR_YELLOW . "panels" . COLOR_DEFAULT . "\t all Keyhelp systems configured" . PHP_EOL;
|
||||||
|
@ -187,8 +187,7 @@ class BindAPI
|
||||||
match ($subcommand) {
|
match ($subcommand) {
|
||||||
'permissions' => $this->handleCheckPermissions(),
|
'permissions' => $this->handleCheckPermissions(),
|
||||||
'panels' => $this->handleCheckPanels(),
|
'panels' => $this->handleCheckPanels(),
|
||||||
'domains' => $this->handleCheckDomains(),
|
'showincludes' => $this->showIncludes(),
|
||||||
'showincludes' => $this->handleCheckShowIncludes(),
|
|
||||||
};
|
};
|
||||||
} catch (UnhandledMatchError) {
|
} catch (UnhandledMatchError) {
|
||||||
echo 'Unknown action: ' . $subcommand . PHP_EOL;
|
echo 'Unknown action: ' . $subcommand . PHP_EOL;
|
||||||
|
@ -344,7 +343,12 @@ class BindAPI
|
||||||
foreach ($domains as $domain) {
|
foreach ($domains as $domain) {
|
||||||
if ($this->isValidSecondLevelDomain(domainName: $domain->domain, panel: $panel->getName(), parent: $domain->id_parent_domain)) {
|
if ($this->isValidSecondLevelDomain(domainName: $domain->domain, panel: $panel->getName(), parent: $domain->id_parent_domain)) {
|
||||||
echo COLOR_DEFAULT . " Domain: " . COLOR_YELLOW . str_pad(string: $domain->domain, length: $maxDomainName);
|
echo COLOR_DEFAULT . " Domain: " . COLOR_YELLOW . str_pad(string: $domain->domain, length: $maxDomainName);
|
||||||
|
try {
|
||||||
$this->checkNS(domainName: $domain->domain, panel: $panel);
|
$this->checkNS(domainName: $domain->domain, panel: $panel);
|
||||||
|
} catch (DependencyException|NotFoundException $e) {
|
||||||
|
print($e->getMessage());
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
$domainCount++;
|
$domainCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -388,6 +392,8 @@ class BindAPI
|
||||||
* @param \App\Entity\Panel $panel
|
* @param \App\Entity\Panel $panel
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
|
* @throws \DI\DependencyException
|
||||||
|
* @throws \DI\NotFoundException
|
||||||
*/
|
*/
|
||||||
function checkNS(string $domainName, Panel $panel)
|
function checkNS(string $domainName, Panel $panel)
|
||||||
{
|
{
|
||||||
|
@ -1062,7 +1068,9 @@ class BindAPI
|
||||||
echo "Domain: $name already exists." . PHP_EOL;
|
echo "Domain: $name already exists." . PHP_EOL;
|
||||||
exit(1);
|
exit(1);
|
||||||
} else {
|
} else {
|
||||||
if (!$this->panelRepository->findByName(name: $panel)) {
|
if ($this->panelRepository->findByName(name: $panel)) {
|
||||||
|
$content = $this->domainController->createPanelContent(panel: $panel);
|
||||||
|
} else {
|
||||||
echo 'Unknown panel: ' . $panel;
|
echo 'Unknown panel: ' . $panel;
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -1098,6 +1106,8 @@ class BindAPI
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$content = [];
|
||||||
if (!empty($panelName)) {
|
if (!empty($panelName)) {
|
||||||
$panel = $this->panelRepository->findByName(name: $panelName);
|
$panel = $this->panelRepository->findByName(name: $panelName);
|
||||||
}
|
}
|
||||||
|
@ -1312,7 +1322,7 @@ class BindAPI
|
||||||
* @throws \DI\DependencyException
|
* @throws \DI\DependencyException
|
||||||
* @throws \DI\NotFoundException
|
* @throws \DI\NotFoundException
|
||||||
*/
|
*/
|
||||||
function handleCheckShowIncludes()
|
private function showIncludes()
|
||||||
{
|
{
|
||||||
$nameservers = $this->nameserverRepository->findAll();
|
$nameservers = $this->nameserverRepository->findAll();
|
||||||
|
|
||||||
|
@ -1338,13 +1348,4 @@ class BindAPI
|
||||||
echo PHP_EOL . 'After the modification feel free to run ' . COLOR_YELLOW . 'named-checkconf' . COLOR_DEFAULT . ' to ensure there were no errors.' . PHP_EOL;
|
echo PHP_EOL . 'After the modification feel free to run ' . COLOR_YELLOW . 'named-checkconf' . COLOR_DEFAULT . ' to ensure there were no errors.' . PHP_EOL;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws \DI\DependencyException
|
|
||||||
* @throws \DI\NotFoundException
|
|
||||||
*/
|
|
||||||
function handleCheckDomains()
|
|
||||||
{
|
|
||||||
$this->domainController->checkDomains();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue