Skip to content

Commit 6b79594

Browse files
committed
Add daemonReload for SystemCtl
1 parent d94204f commit 6b79594

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/SystemCtl.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,4 +155,20 @@ public function getProcessBuilder(): ProcessBuilder
155155

156156
return $builder;
157157
}
158+
159+
/**
160+
* Restart the daemon to reload specs and new units
161+
*
162+
* @return bool
163+
*/
164+
public function daemonReload(): bool
165+
{
166+
$processBuilder = $this->getProcessBuilder();
167+
$processBuilder->add('daemon-reload');
168+
169+
$process = $processBuilder->getProcess();
170+
$process->run();
171+
172+
return $process->isSuccessful();
173+
}
158174
}

0 commit comments

Comments
 (0)