Files
web-installer/scan.php
root 8399a6b3bb
All checks were successful
continuous-integration/drone/push Build is passing
redis check
2024-08-12 19:59:59 +02:00

36 lines
673 B
PHP

<?php
include "functions.php";
switch ($_GET["op"]) {
case "redis":
try {
$ret = ping_redis();
if ($ret===false) {
echo "Can't ping redis-server";
}
else echo "OK";
} catch (RedisException $e) {
echo "RedisException caught: " . $e->getMessage();
}
break;
case "init":
$arr = array("STATUS" => 0);
$json = json_encode($arr, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT);
$op = "init:".date("YmdHis");
redis_set($op,$json);
break;
case "init_check":
$data = check_redis("web_out");
if ($data["STATUS"]==2) echo "NEW";
elseif ($data["STATUS"]==1) echo "EXISTS";
else echo "WAIT";
break;
case "docker":
echo true;
break;
}
?>