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