Set serviceLog from systemctl status

This commit is contained in:
billz 2024-03-08 10:50:02 +01:00
parent 87216bdc02
commit ef7b67a445

View file

@ -45,6 +45,9 @@ function DisplayRestAPI()
exec("ps aux | grep -v grep | grep uvicorn", $output, $return);
$serviceStatus = !empty($output) ? "up" : "down";
exec("sudo systemctl status restapi.service", $output, $return);
$serviceLog = implode("\n", $output);
echo renderTemplate("restapi", compact(
"status",
"apiKey",