checkSetup has verbose disabled if not explicitly called
This commit is contained in:
parent
e94819ed7f
commit
61b24edfdf
|
@ -54,7 +54,7 @@ class CLIController
|
||||||
|
|
||||||
function checkSetup(): void
|
function checkSetup(): void
|
||||||
{
|
{
|
||||||
if (!$this->domainController->checkPermissions()) {
|
if (!$this->domainController->checkPermissions(disableVerbose: true)) {
|
||||||
echo 'You need to setup the bindAPI first.' . PHP_EOL;
|
echo 'You need to setup the bindAPI first.' . PHP_EOL;
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@ class CLIController
|
||||||
'domains' => $this->handleDomains(subcommand: $subcommand),
|
'domains' => $this->handleDomains(subcommand: $subcommand),
|
||||||
'dyndns' => $this->handleDynDns(subcommand: $subcommand),
|
'dyndns' => $this->handleDynDns(subcommand: $subcommand),
|
||||||
'nameservers' => $this->handleNameservers(subcommand: $subcommand),
|
'nameservers' => $this->handleNameservers(subcommand: $subcommand),
|
||||||
default => $this->unknownSubcommand(subcommand: $subcommand)
|
default => $this->unknownCommand(command: $command)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,6 +180,12 @@ class CLIController
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function unknownCommand(string $command): void
|
||||||
|
{
|
||||||
|
echo COLOR_DEFAULT . 'Unknown command: ' . COLOR_YELLOW . $command . COLOR_DEFAULT . PHP_EOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function unknownSubcommand(string $subcommand): void
|
function unknownSubcommand(string $subcommand): void
|
||||||
{
|
{
|
||||||
if ($subcommand) {
|
if ($subcommand) {
|
||||||
|
@ -1029,6 +1035,7 @@ class CLIController
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO remove
|
||||||
echo 'fqdn: ' . $name;
|
echo 'fqdn: ' . $name;
|
||||||
|
|
||||||
$domainParts = explode(separator: '.', string: $name);
|
$domainParts = explode(separator: '.', string: $name);
|
||||||
|
@ -1052,7 +1059,9 @@ class CLIController
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "found domian" . $foundDomain . PHP_EOL;
|
if ($this->configController->getConfig(configKey: 'verbose')) {
|
||||||
|
echo "Found domain: " . $foundDomain . PHP_EOL;
|
||||||
|
}
|
||||||
|
|
||||||
// get host
|
// get host
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue