added chekcs for cron job
This commit is contained in:
parent
753e96ed85
commit
4e056f6831
8
TODO
8
TODO
|
@ -1,8 +1,6 @@
|
||||||
Cron on all 4 ns.
|
b4 cron job: check panel, check nameserver1
|
||||||
BUG, NS$: No nameserver marked as this server.
|
check log file location
|
||||||
BUG, NS1: Only one nameserver is designated as our host OK, but all are …
|
API Endpoint cleanup
|
||||||
panels:apiping on all 4 servers
|
|
||||||
API Endpint cleanup
|
|
||||||
check keytype of panel/bindApi
|
check keytype of panel/bindApi
|
||||||
more UNIT tests
|
more UNIT tests
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "24unix/bindapi",
|
"name": "24unix/bindapi",
|
||||||
"description": "manage Bind9 DNS server via REST API",
|
"description": "manage Bind9 DNS server via REST API",
|
||||||
"version": "1.0.9",
|
"version": "1.0.9",
|
||||||
"build_number": "371",
|
"build_number": "372",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Micha Espey",
|
"name": "Micha Espey",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Copy this files to /etc/systems/system, adapt the path in the service unit and enable the timer by issuing:
|
Copy these files to /etc/systems/system, adapt the path in the service unit and enable the timer by issuing:
|
||||||
|
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl enable bindAPI.timer
|
systemctl enable bindAPI.timer
|
||||||
|
|
|
@ -105,6 +105,12 @@ class CLIController
|
||||||
$this->cronRun();
|
$this->cronRun();
|
||||||
})))
|
})))
|
||||||
->addCommandGroup(commandGroup: (new CommandGroup(name: 'check', description: 'health checks the system can perform'))
|
->addCommandGroup(commandGroup: (new CommandGroup(name: 'check', description: 'health checks the system can perform'))
|
||||||
|
->addCommand(command: new Command(
|
||||||
|
name: 'cache',
|
||||||
|
callback: function () {
|
||||||
|
$this->checkCache();
|
||||||
|
},
|
||||||
|
description: 'Clear the opcache. Note: It doesn\'t call composer clear-cache.'))
|
||||||
->addCommand(command: new Command(
|
->addCommand(command: new Command(
|
||||||
name: 'permissions',
|
name: 'permissions',
|
||||||
callback: function () {
|
callback: function () {
|
||||||
|
@ -2387,6 +2393,8 @@ const VERSION = '{$versionSting}';
|
||||||
private function cronRun()
|
private function cronRun()
|
||||||
{
|
{
|
||||||
$this->logger->info(message: 'cronRun()');
|
$this->logger->info(message: 'cronRun()');
|
||||||
|
$this->checkPanel();
|
||||||
|
$this->checkNameserver();
|
||||||
$this->domainsUpdate();
|
$this->domainsUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -245,7 +245,9 @@ class RequestController
|
||||||
description: 'Returns information of a single domain specified by its domain name.',
|
description: 'Returns information of a single domain specified by its domain name.',
|
||||||
summary: 'Returns a single domain.',
|
summary: 'Returns a single domain.',
|
||||||
security: [
|
security: [
|
||||||
|
['Authorization' => []]
|
||||||
],
|
],
|
||||||
|
|
||||||
tags: ['Domains'],
|
tags: ['Domains'],
|
||||||
parameters: [
|
parameters: [
|
||||||
new OA\Parameter(name: 'name', in: 'path', required: true, schema: new OA\Schema(type: 'string')),
|
new OA\Parameter(name: 'name', in: 'path', required: true, schema: new OA\Schema(type: 'string')),
|
||||||
|
@ -410,9 +412,6 @@ class RequestController
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
private function handleDomainsDeleteRequest(): void
|
private function handleDomainsDeleteRequest(): void
|
||||||
{
|
{
|
||||||
$deleteData = fopen(filename: 'php://input', mode: 'r');
|
$deleteData = fopen(filename: 'php://input', mode: 'r');
|
||||||
|
@ -622,11 +621,7 @@ class RequestController
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param String $host
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
private function getDomain(string $host): string
|
private function getDomain(string $host): string
|
||||||
{
|
{
|
||||||
$host = strtolower(string: trim(string: $host));
|
$host = strtolower(string: trim(string: $host));
|
||||||
|
|
Loading…
Reference in New Issue