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.

40 lines
713 B

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