1
0
Fork 0
mirror of synced 2024-06-03 03:14:50 +12:00
appwrite/app/tasks/init.php
2020-03-01 08:33:19 +02:00

30 lines
628 B
PHP

#!/bin/env php
<?php
require_once __DIR__.'/../init.php';
global $request;
use Utopia\CLI\CLI;
use Utopia\CLI\Console;
$cli = new CLI();
$cli
->task('ssl')
->desc('Validate server certificates')
->action(function () use ($request) {
$domain = $request->getServer('_APP_DOMAIN', '');
Console::log('Issue a TLS certificate for master domain ('.$domain.')');
Resque::enqueue('v1-certificates', 'CertificatesV1', [
'document' => [],
'domain' => $domain,
'validateTarget' => false,
'validateCNAME' => false,
]);
});
$cli->run();