added check:bootstrap

This commit is contained in:
tracer 2024-05-03 19:41:18 +02:00
parent 17e70f14a2
commit b147cda096
3 changed files with 16 additions and 3 deletions

2
TODO
View File

@ -1,9 +1,9 @@
check:cache
check:bootstrap check:bootstrap
check:version remove option update, we have -v as option check:version remove option update, we have -v as option
move stuff to dev:xxx which is not needed for endusers move stuff to dev:xxx which is not needed for endusers
make use of environment, somehow, dev, prod, test make use of environment, somehow, dev, prod, test
check log file location check log file location
check:config *validate if all required fields are set, sanity checks.
API Endpoint cleanup API Endpoint cleanup
check keytype of panel/bindApi check keytype of panel/bindApi
check:configkey => update config.json check:configkey => update config.json

View File

@ -2,7 +2,7 @@
"name": "tracer/bindapi", "name": "tracer/bindapi",
"description": "manage Bind9 client zones for KeyHelp", "description": "manage Bind9 client zones for KeyHelp",
"version": "1.0.9", "version": "1.0.9",
"build_number": "376", "build_number": "377",
"authors": [ "authors": [
{ {
"name": "Micha Espey", "name": "Micha Espey",

View File

@ -239,6 +239,12 @@ class CLIController
$this->checkNameservers(); $this->checkNameservers();
}, },
description: 'Check version on nameservers')) description: 'Check version on nameservers'))
->addCommand(command: new Command(
name: 'bootstrap',
callback: function () {
$this->checkBootstrap();
},
description: 'Check version on nameservers'))
->addCommand(command: new Command( ->addCommand(command: new Command(
name: 'domains', name: 'domains',
callback: function () { 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 public function createOpenAPIBootstrap(): void
{ {
@ -2429,4 +2434,12 @@ const VERSION = '{$versionSting}';
echo Color::RED . 'Errror: ' . Colors::DEFAULT . 'Missing function opcache_clear()' . PHP_EOL; 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;
}
}
} }