summaryrefslogtreecommitdiffstats
path: root/check.php
diff options
context:
space:
mode:
Diffstat (limited to 'check.php')
-rwxr-xr-xcheck.php24
1 files changed, 18 insertions, 6 deletions
diff --git a/check.php b/check.php
index 4e4cf1de..16138543 100755
--- a/check.php
+++ b/check.php
@@ -95,13 +95,15 @@ $mirrors = [
'https://mirror.mangohost.net/remi/',
'https://bd.mirror.vanehost.com/Remi/',
'https://repo1.vetta.net.nz/remi/',
- 'https://cdn.centos.no/remi/',
- 'https://mirror.centos.no/remi/',
+ 'https://cdn.fjordos.no/remi/',
+ 'https://mirror.fjordos.no/remi/',
'https://muug.ca/mirror/remi/',
'https://mirror.netzwerge.de/remi/',
];
$testing = [
'https://pit1.mirror.jurassicinnovations.com/remi/',
+ 'https://mirror.raiolanetworks.com/remi/',
+ 'http://repo1.ash.innoscale.net/remi/',
];
$disabled = [
'https://remi.mivzakim.net/', // 2024-04-03
@@ -112,7 +114,6 @@ $disabled = [
'http://mirror.uta.edu.ec/remi/',
'http://repo1.dal.innoscale.net/remi/',
'http://repo1.sea.innoscale.net/remi/',
- 'http://repo1.ash.innoscale.net/remi/',
'http://mirror.yer.az/remi/',
];
$deprecated = [
@@ -231,12 +232,14 @@ if ($ref) {
printf("%50.50s : ** Corrupted **\n", $mirror);
} else if ($ref == $loc) {
printf("%50.50s : Ok\n", $mirror);
+ exit(0);
} else if ($loc) {
printf("%50.50s : %s\n", $mirror, date('r', $loc));
+ exit(1);
} else {
printf("%50.50s : N/A\n", $mirror);
}
- break;
+ exit(2);
}
continue;
}
@@ -257,7 +260,8 @@ if ($ref) {
}
}
if ($cli) {
- $nb=count($pids);
+ $nb = count($pids);
+ $ok = $lack = 0;
while (count($pids)) {
if (posix_isatty(STDOUT)) {
printf("Wait %d\r", count($pids));
@@ -267,10 +271,18 @@ if ($ref) {
die("Cound not wait\n");
exit (1);
} else {
+ switch (pcntl_wexitstatus($status)) {
+ case 0:
+ $ok++;
+ break;
+ case 1:
+ $lack++;
+ break;
+ }
unset($pids[$pid]);
}
}
- if ($nb) printf("%d mirrors checked.\n", $nb);
+ if ($nb) printf("%3d mirrors checked,\n%3d are OK\n%3d are stalled\n%3d are KO.\n", $nb, $ok, $lack, $nb-$ok-$lack);
} else {
echo "</ul>\n";
}