| @@ 78-91 (lines=14) @@ | ||
| 75 | * @param mixed $composeFiles The compose files names |
|
| 76 | * @param string $signal Optionnal to precise SIGNAL to send to the container for SIGKILL replacement. |
|
| 77 | */ |
|
| 78 | public function kill($composeFiles = array(), $signal = 'SIGKILL') |
|
| 79 | { |
|
| 80 | $command = 'kill'; |
|
| 81 | ||
| 82 | if ($signal !== 'SIGKILL') { |
|
| 83 | $command .= ' -s ' . $signal; |
|
| 84 | } |
|
| 85 | ||
| 86 | return $this->processResult( |
|
| 87 | $this->execute( |
|
| 88 | $this->formatCommand($command, $this->createComposeFileCollection($composeFiles)) |
|
| 89 | ) |
|
| 90 | ); |
|
| 91 | } |
|
| 92 | ||
| 93 | /** |
|
| 94 | * Build service images |
|
| @@ 131-144 (lines=14) @@ | ||
| 128 | * @param mixed $composeFiles The compose files names |
|
| 129 | * @param integer $timeout If we want attempt to pull a newer version of the from image |
|
| 130 | */ |
|
| 131 | public function restart($composeFiles = array(), $timeout = 10) |
|
| 132 | { |
|
| 133 | $command = 'restart'; |
|
| 134 | ||
| 135 | if ($timeout != 10) { |
|
| 136 | $command .= ' --timeout='.$timeout; |
|
| 137 | } |
|
| 138 | ||
| 139 | return $this->processResult( |
|
| 140 | $this->execute( |
|
| 141 | $this->formatCommand($command, $this->createComposeFileCollection($composeFiles)) |
|
| 142 | ) |
|
| 143 | ); |
|
| 144 | } |
|
| 145 | ||
| 146 | /** |
|
| 147 | * Run service with command |
|