OpenSource CLI-App to install and handle stuff related to Web-Server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
745 B

  1. <?php
  2. namespace App\Commands;
  3. use Illuminate\Console\Scheduling\Schedule;
  4. use LaravelZero\Framework\Commands\Command;
  5. /**
  6. * Add LetsEncrypt Certificate
  7. *
  8. *
  9. *
  10. */
  11. class LetsEncryptAddCommand extends Command
  12. {
  13. /**
  14. * The signature of the command.
  15. *
  16. * @var string
  17. */
  18. protected $signature = 'lets-encrypt:add {domain*}';
  19. /**
  20. * The description of the command.
  21. *
  22. * @var string
  23. */
  24. protected $description = 'Add Certificates from LetsEncrypt';
  25. /**
  26. * Execute the console command.
  27. *
  28. * @return mixed
  29. *
  30. */
  31. public function handle()
  32. {
  33. $domains = $this->argument('domain');
  34. exec('certbot --nginx '.implode('-d ', $domains), $output);
  35. }
  36. }