Conditions | 2 |
Paths | 2 |
Total Lines | 25 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | public function start() |
||
26 | { |
||
27 | $process = $this->runCommand([ |
||
28 | $this->getBinary(), |
||
29 | 'status', |
||
30 | ], true); |
||
31 | |||
32 | // Already running, restart |
||
33 | if (false !== strpos($process->getOutput(), 'litespeed is running with PID')) { |
||
34 | $this->runCommand([ |
||
35 | $this->getBinary(), |
||
36 | 'restart', |
||
37 | ], true); |
||
38 | |||
39 | return; |
||
40 | } |
||
41 | |||
42 | // Otherwise start |
||
43 | $this->runCommand([ |
||
44 | $this->getBinary(), |
||
45 | 'start', |
||
46 | ], true); |
||
47 | |||
48 | $this->waitFor($this->getIp(), $this->getPort(), 2000); |
||
49 | } |
||
50 | |||
100 |