Skip to content

Commit a99d924

Browse files
Andreas Frömericanhazstring
authored andcommitted
Add reset-failed command
Signed-off-by: Andreas Frömer <andreas.froemer@check24.de>
1 parent 9548ff7 commit a99d924

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/SystemCtl.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,24 @@ public function getSockets(?string $unitPrefix = null): array
233233
* Restart the daemon to reload specs and new units
234234
*
235235
* @return bool
236+
* @throws Exception\CommandFailedException
236237
*/
237238
public function daemonReload(): bool
238239
{
239240
return $this->getCommandDispatcher()->dispatch('daemon-reload')->isSuccessful();
240241
}
241242

243+
/**
244+
* Reset failed state of all unit so they won't be listed using listUnits
245+
*
246+
* @return bool
247+
* @throws Exception\CommandFailedException
248+
*/
249+
public function resetFailed(): bool
250+
{
251+
return $this->getCommandDispatcher()->dispatch('reset-failed')->isSuccessful();
252+
}
253+
242254
/**
243255
* @return CommandDispatcherInterface
244256
*/

0 commit comments

Comments
 (0)