Conditions | 2 |
Paths | 2 |
Total Lines | 27 |
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 | $this->waitFor($this->getIp(), $this->getPort(), 5000); |
||
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(), 5000); |
||
51 | } |
||
52 | |||
102 |