From b147cda09652661dd663d708423d54cfebae44aa Mon Sep 17 00:00:00 2001 From: tracer Date: Fri, 3 May 2024 19:41:18 +0200 Subject: [PATCH] added check:bootstrap --- TODO | 2 +- composer.json | 2 +- src/Controller/CLIController.php | 15 ++++++++++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index f573f0c..4fb4047 100644 --- a/TODO +++ b/TODO @@ -1,9 +1,9 @@ -check:cache check:bootstrap check:version remove option update, we have -v as option move stuff to dev:xxx which is not needed for endusers make use of environment, somehow, dev, prod, test check log file location +check:config *validate if all required fields are set, sanity checks. API Endpoint cleanup check keytype of panel/bindApi check:configkey => update config.json diff --git a/composer.json b/composer.json index e1083d8..36fecee 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "tracer/bindapi", "description": "manage Bind9 client zones for KeyHelp", "version": "1.0.9", - "build_number": "376", + "build_number": "377", "authors": [ { "name": "Micha Espey", diff --git a/src/Controller/CLIController.php b/src/Controller/CLIController.php index 572531e..af04eaa 100644 --- a/src/Controller/CLIController.php +++ b/src/Controller/CLIController.php @@ -239,6 +239,12 @@ class CLIController $this->checkNameservers(); }, description: 'Check version on nameservers')) + ->addCommand(command: new Command( + name: 'bootstrap', + callback: function () { + $this->checkBootstrap(); + }, + description: 'Check version on nameservers')) ->addCommand(command: new Command( name: 'domains', callback: function () { @@ -1673,7 +1679,6 @@ class CLIController } } -// FIXME add method create bootstrap php, add it to create, delete and update nameservers public function createOpenAPIBootstrap(): void { @@ -2429,4 +2434,12 @@ const VERSION = '{$versionSting}'; echo Color::RED . 'Errror: ' . Colors::DEFAULT . 'Missing function opcache_clear()' . PHP_EOL; } } + + private function checkBootstrap() + { + $this->createOpenAPIBootstrap(); + if (!$this->quiet) { + echo 'Created new bootsrap.php' . PHP_EOL; + } + } }