Conditions | 4 |
Paths | 4 |
Total Lines | 26 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
32 | protected function doExecute() |
||
33 | { |
||
34 | |||
35 | $action = $this->input->getArgument('action'); |
||
36 | |||
37 | if($action === 'reload') |
||
38 | { |
||
39 | |||
40 | if (PHP_OS == "Darwin") { |
||
41 | $this->processProvider->executeSudoCommand("apachectl -k restart"); |
||
42 | } |
||
43 | else{ |
||
44 | if ($this->app["config"]["webserver"]["engine"] == 'nginx') { |
||
45 | $this->processProvider->executeSudoCommand("service nginx reload"); |
||
46 | } else { |
||
47 | $this->processProvider->executeSudoCommand("service apache2 reload"); |
||
48 | } |
||
49 | } |
||
50 | |||
51 | } |
||
52 | else |
||
53 | { |
||
54 | $this->dialogProvider->logError("Webserver action '$action' not implemented", true); |
||
55 | } |
||
56 | |||
57 | } |
||
58 | } |
||
59 |