Object-oriented interface to systemd.
This project is no longer maintained and is archived for historical reference. No further updates or fixes, including security fixes, are planned. Compatibility with current PHP and systemd versions has not been verified. The documentation and examples below describe the historical version.
systemd watchdog restarts frozen service.
use Mekras\SystemD\SystemD;
$systemd = new SystemD();
$keepAlive = $systemd->watchdog()->isEnabled();
//...
while (true) {
if ($keepAlive) {
$systemd->watchdog()->ping();
}
//...
}
