| @@ 58-68 (lines=11) @@ | ||
| 55 | /** |
|
| 56 | * {@inheritdoc} |
|
| 57 | */ |
|
| 58 | public function stop($service) |
|
| 59 | { |
|
| 60 | if (empty($service)) { |
|
| 61 | throw new \Exception('No service selected to be started'); |
|
| 62 | } |
|
| 63 | ||
| 64 | $this->service = $service; |
|
| 65 | $this->action = 'stop'; |
|
| 66 | ||
| 67 | return $this; |
|
| 68 | } |
|
| 69 | ||
| 70 | /** |
|
| 71 | * {@inheritdoc} |
|
| @@ 103-113 (lines=11) @@ | ||
| 100 | /** |
|
| 101 | * {@inheritdoc} |
|
| 102 | */ |
|
| 103 | public function disable($service) |
|
| 104 | { |
|
| 105 | if (empty($service)) { |
|
| 106 | throw new \Exception('No service selected to be disabled'); |
|
| 107 | } |
|
| 108 | ||
| 109 | $this->service = $service; |
|
| 110 | $this->action = 'disable'; |
|
| 111 | ||
| 112 | return $this; |
|
| 113 | } |
|
| 114 | ||
| 115 | /** |
|
| 116 | * {@inheritdoc} |
|
| @@ 55-66 (lines=12) @@ | ||
| 52 | /** |
|
| 53 | * {@inheritdoc} |
|
| 54 | */ |
|
| 55 | public function start($service) |
|
| 56 | { |
|
| 57 | if (empty($service)) { |
|
| 58 | throw new \Exception('No service selected to be started'); |
|
| 59 | } |
|
| 60 | ||
| 61 | $this->cmd = '/etc/init.d'; |
|
| 62 | $this->service = $service; |
|
| 63 | $this->action = 'start'; |
|
| 64 | ||
| 65 | return $this; |
|
| 66 | } |
|
| 67 | ||
| 68 | /** |
|
| 69 | * {@inheritdoc} |
|
| @@ 71-82 (lines=12) @@ | ||
| 68 | /** |
|
| 69 | * {@inheritdoc} |
|
| 70 | */ |
|
| 71 | public function stop($service) |
|
| 72 | { |
|
| 73 | if (empty($service)) { |
|
| 74 | throw new \Exception('No service selected to be started'); |
|
| 75 | } |
|
| 76 | ||
| 77 | $this->cmd = '/etc/init.d'; |
|
| 78 | $this->service = $service; |
|
| 79 | $this->action = 'stop'; |
|
| 80 | ||
| 81 | return $this; |
|
| 82 | } |
|
| 83 | ||
| 84 | /** |
|
| 85 | * {@inheritdoc} |
|
| @@ 87-98 (lines=12) @@ | ||
| 84 | /** |
|
| 85 | * {@inheritdoc} |
|
| 86 | */ |
|
| 87 | public function restart($service) |
|
| 88 | { |
|
| 89 | if (empty($service)) { |
|
| 90 | throw new \Exception('No service selected to be started'); |
|
| 91 | } |
|
| 92 | ||
| 93 | $this->cmd = '/etc/init.d'; |
|
| 94 | $this->service = $service; |
|
| 95 | $this->action = 'restart'; |
|
| 96 | ||
| 97 | return $this; |
|
| 98 | } |
|
| 99 | ||
| 100 | /** |
|
| 101 | * {@inheritdoc} |
|