From ef7b67a4457cd53c5985b1bbdc79f856b2c52fbe Mon Sep 17 00:00:00 2001 From: billz Date: Fri, 8 Mar 2024 10:50:02 +0100 Subject: [PATCH] Set serviceLog from systemctl status --- includes/restapi.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/restapi.php b/includes/restapi.php index 7ae0db6f..ff16c997 100644 --- a/includes/restapi.php +++ b/includes/restapi.php @@ -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",