Initial version of jilo-agent.php

main
Yasen Pramatarov 2024-09-01 15:53:48 +03:00
parent 124a9a73b9
commit 4e8de4b728
1 changed files with 16 additions and 0 deletions

16
jilo-agent.php 100644
View File

@ -0,0 +1,16 @@
<?php
// nginx status
if ($_SERVER['REQUEST_URI'] === '/nginx/status') {
echo json_encode(['nginx' => 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']);
}
?>