1
0
Fork 0
mirror of synced 2024-07-06 07:00:56 +12:00
appwrite/app/tasks/ssl.php

26 lines
625 B
PHP
Raw Normal View History

2020-07-29 07:48:51 +12:00
<?php
global $cli;
use Appwrite\Event\Certificate;
2020-07-29 07:48:51 +12:00
use Utopia\App;
use Utopia\CLI\Console;
use Utopia\Database\Document;
2020-07-29 07:48:51 +12:00
$cli
->task('ssl')
->desc('Validate server certificates')
->action(function () {
$domain = App::getEnv('_APP_DOMAIN', '');
Console::log('Issue a TLS certificate for master domain (' . $domain . ') in 30 seconds.
2020-07-29 07:48:51 +12:00
Make sure your domain points to your server or restart to try again.');
$event = new Certificate();
$event
->setDomain(new Document([
'domain' => $domain
]))
->trigger();
});