Files
html/api/wevia-auto-heal.php
WEVIA d80dde11c4
Some checks failed
WEVAL NonReg / nonreg (push) Has been cancelled
feat-auto-heal-209tools-fpm-fix
2026-04-13 01:12:24 +02:00

9 lines
590 B
PHP

<?php
header("Content-Type: application/json");
$w = intval(trim(shell_exec("pgrep -c php-fpm 2>/dev/null")));
$act = "none";
if($w > 50) { shell_exec("killall -9 php-fpm8.5; sleep 2; systemctl start php8.5-fpm &"); $act = "RESTART_$w"; }
$pages = ["tools-hub.html","apps.html","enterprise-model.html","agents-archi.html","nonreg.html"];
$miss = []; foreach($pages as $p) if(!file_exists("/var/www/html/$p")) $miss[] = $p;
echo json_encode(["ok"=>$w<50&&empty($miss),"workers"=>$w,"pages"=>count($pages)-count($miss)."/".count($pages),"missing"=>$miss,"action"=>$act,"ts"=>date("H:i:s")]);