diff --git a/README.md b/README.md index 025e0ec..b6a5483 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # lwa LWA - Linux server management (multi-platform) with web ui -**Requirements: ** +**Requirements** - Apache2/Nginx -- PHP with PHP-Mysql extension +- PHP with PHP-Mysqli extension - MariaDB Database **Configure credentials in db-config.php file** diff --git a/index.php b/index.php index e69de29..f55061c 100644 --- a/index.php +++ b/index.php @@ -0,0 +1,36 @@ +"; +echo ""; +echo "Service Name"; +echo "Status"; +echo ""; + +foreach ($services as $service) { + $output = shell_exec("systemctl is-active $service"); + $status = trim($output); + + echo ""; + echo "" . $service . ""; + + if ($status == "active") { + echo "" . $status . ""; + } else { + echo "" . $status . ""; + } + + echo ""; +} + +echo ""; + +mysqli_close($conn); +?>