1
0
Fork 0
mirror of synced 2024-10-03 02:37:40 +13:00
appwrite/app/tasks/ssl.php
2022-04-27 09:02:31 +00:00

21 lines
No EOL
634 B
PHP

<?php
global $cli;
use Appwrite\Event\Event;
use Utopia\App;
use Utopia\CLI\Console;
use Utopia\Validator\Hostname;
$cli
->task('ssl')
->desc('Validate server certificates')
->param('domain', App::getEnv('_APP_DOMAIN', ''), new Hostname(), 'Domain to generate certificate for. If empty, main domain will be used.', true)
->action(function ($domain) {
Console::success('Scheduling a job to issue a TLS certificate for domain:' . $domain);
// Scheduje a job
Resque::enqueue(Event::CERTIFICATES_QUEUE_NAME, Event::CERTIFICATES_CLASS_NAME, [
'domain' => $domain,
]);
});