Files
newznab-tmux/app/Console/Commands/TmuxUIStart.php
T
2018-09-04 15:35:05 +02:00

49 lines
1.1 KiB
PHP

<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Symfony\Component\Process\Process;
class TmuxUIStart extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'tmux-ui:start';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Start the processing of tmux scripts. This is functionally equivalent to setting the
\'tmux running\' setting in admin.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
* @throws \Symfony\Component\Process\Exception\LogicException
* @throws \Symfony\Component\Process\Exception\RuntimeException
*/
public function handle()
{
$process = new Process('php misc/update/tmux/start.php');
$process->setPty(Process::isPtySupported());
$process->run();
}
}