diff --git a/functions.php b/functions.php new file mode 100644 index 0000000..1d12a48 --- /dev/null +++ b/functions.php @@ -0,0 +1,31 @@ + diff --git a/index.php b/index.php new file mode 100644 index 0000000..f10e6c9 --- /dev/null +++ b/index.php @@ -0,0 +1,28 @@ + getNginxStatus(), + 'nginx_connections' => getNginxConnections(), + ]; + echo json_encode($data, JSON_PRETTY_PRINT) . "\n"; + +// jvb status +} elseif ($_SERVER['REQUEST_URI'] === '/jvb') { + $data = [ + 'jvb_status' => getJVBStatus(), + ]; + echo json_encode($data, JSON_PRETTY_PRINT) . "\n"; + +// default response - error +} else { + echo json_encode(['error' => 'Endpoint not found']) . "\n"; +} + +?> diff --git a/jilo-agent.php b/jilo-agent.php deleted file mode 100644 index 49bae8a..0000000 --- a/jilo-agent.php +++ /dev/null @@ -1,16 +0,0 @@ - shell_exec('/etc/init.d/nginx status')]); - -// jvb status -} elseif ($_SERVER['REQUEST_URI'] === '/jvb/status') { - echo json_encode(['jvb' => shell_exec('/etc/init.d/jitsi-videobridge status')]); - -// default response - error -} else { - echo json_encode(['error' => 'Endpoint not found']); -} - -?>