services instead of running services
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2024-09-12 06:25:17 +00:00
parent 20e44a0f1f
commit 536bc979cc
2 changed files with 50 additions and 4 deletions

View File

@@ -58,6 +58,33 @@ switch ($_GET["op"]) {
}
else echo "WAIT";
break;
case "services":
$arr = array("STATUS" => 0);
$json = json_encode($arr, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT);
$op = "services"; //"init:".date("YmdHis");
redis_set($op,$json);
echo "OK"; // TODO?
break;
case "check_services":
$arr = check_redis("web_out","services");
if (!empty($arr)) {
foreach ($arr as $key=>$data) {
if ($key=="services") {
if ($data["INSTALL_STATUS"]==2) echo "NEW";
elseif ($data["INSTALL_STATUS"]==1) {
foreach ($data["INSTALLED_SERVICES"] as $service_name => $content) {
//echo base64_decode($content);
echo $service_name."<br>";
}
echo "<br>";
}
redis_remove("$key");
}
}
}
else echo "WAIT";
break;
case "deployments":
$arr = array("STATUS" => 0);
$json = json_encode($arr, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT);