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.

51 lines
872 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. <?php
  2. namespace App\Commands;
  3. use Illuminate\Console\Scheduling\Schedule;
  4. use LaravelZero\Framework\Commands\Command;
  5. use Illuminate\Support\Facades\File;
  6. use App\Facades\Install;
  7. use Log;
  8. /**
  9. *
  10. *
  11. *
  12. */
  13. class Fail2banCommand extends Command
  14. {
  15. /**
  16. * The signature of the command.
  17. *
  18. * @var string
  19. */
  20. protected $signature = 'fail2ban {--add} {--remove} {configuration}';
  21. /**
  22. * The description of the command.
  23. *
  24. * @var string
  25. */
  26. protected $description = 'add and remove configuration';
  27. /**
  28. * Execute the console command.
  29. *
  30. * @return mixed
  31. */
  32. public function handle()
  33. {
  34. $this->line('kk');
  35. if ($configuration) {
  36. $this->error('Configuration...not found!');
  37. } else {
  38. exec('service fail2ban restart');
  39. }
  40. }
  41. }