diff --git a/composer.json b/composer.json index c62aa83..359eaea 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "24unix/bindapi", "description": "manage Bind9 DNS server via REST API", "version": "1.0.7", - "build_number": "348", + "build_number": "349", "authors": [ { "name": "Micha Espey", diff --git a/src/Controller/CLIController.php b/src/Controller/CLIController.php index 51b0011..93e3ef6 100644 --- a/src/Controller/CLIController.php +++ b/src/Controller/CLIController.php @@ -2127,6 +2127,17 @@ class CLIController } else { if (!$this->quiet) { echo 'Only one panel is designated as our host' . COLOR_GREEN . ' OK' . COLOR_DEFAULT . PHP_EOL; + $self = $this->panelRepository->getSelf(); + $selfName = $self->getName(); + echo 'The panel is configured to be ' . COLOR_YELLOW . $selfName; + $hostname = gethostname(); + if (strcmp(string1: $hostname, string2: $selfName) === 0) { + echo COLOR_DEFAULT . ' and that seems to be valid.' . PHP_EOL; + } else { + echo PHP_EOL; + echo $selfName . COLOR_DEFAULT . ' and ' . COLOR_YELLOW . $hostname . COLOR_DEFAULT . ' differ.' . PHP_EOL; + echo 'Name mismatch, maybe panel:self not set?' . PHP_EOL; + } } }