<?php
|
|
|
|
namespace App\Commands;
|
|
|
|
use Illuminate\Console\Scheduling\Schedule;
|
|
use LaravelZero\Framework\Commands\Command;
|
|
|
|
/**
|
|
* Add LetsEncrypt Certificate
|
|
*
|
|
*
|
|
*
|
|
*/
|
|
class LetsEncryptAddCommand extends Command
|
|
{
|
|
/**
|
|
* The signature of the command.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $signature = 'lets-encrypt:add {domain*}';
|
|
|
|
/**
|
|
* The description of the command.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $description = 'Add Certificates from LetsEncrypt';
|
|
|
|
/**
|
|
* Execute the console command.
|
|
*
|
|
* @return mixed
|
|
*
|
|
*/
|
|
public function handle()
|
|
{
|
|
$domains = $this->argument('domain');
|
|
exec('certbot --nginx '.implode('-d ', $domains), $output);
|
|
}
|
|
}
|