cvs: php-master-web /scripts mirror-test
| From: | Gabor Hojtsy | Date: | Sun, 27 Jun 2004 10:53:15 +0000 |
| Subject: | cvs: php-master-web /scripts mirror-test | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-25146@lists.php.net to get a copy of this message | ||
goba Sun Jun 27 06:53:15 2004 EDT
Modified files:
/php-master-web/scripts mirror-test
Log:
first pass of integration of the mirrmon double check
http://cvs.php.net/diff.php/php-master-web/scripts/mirror-test?r1=1.56&r2=1.57&ty=u
Index: php-master-web/scripts/mirror-test
diff -u php-master-web/scripts/mirror-test:1.56 php-master-web/scripts/mirror-test:1.57
--- php-master-web/scripts/mirror-test:1.56 Tue Sep 9 04:54:38 2003
+++ php-master-web/scripts/mirror-test Sun Jun 27 06:53:15 2004
@@ -38,6 +38,17 @@
// Free up the result to get more memory
mysql_free_result($result);
+// Get mirrmon output to double check our results
+$doublecheck = ''; $mirrmon = array();
+$dcheck = explode("\n", @file_get_contents("http://iso.ego.fi/php_mirrors/state.txt"));
+if (is_array($dcheck) && count($dcheck) == count($hosts)) {
+ $doublecheck = "Double checking " . count($dcheck) . " mirrors\n";
+ foreach ($dcheck as $mirrinfo) {
+ $details = explode(" ", $mirrorinfo);
+ $mirrmon[$details[0]] = array($details[1], $details[3]);
+ }
+}
+
// Get all mirror sites, and count the index of them
foreach ($hosts as $index => $host) {
@@ -179,10 +190,11 @@
}
// Send a debug mail at midnight with current details
-if (intval(date("H")) == 0) {
+//if (intval(date("H")) == 0) {
@mail(
"goba@php.net",
"Mirror site updates done",
+ "$doublecheck" .
"$mirrorsupdated mirror sites properly updated (out of " . count($hosts) .
")\n\nProblematic mirrors:\n\n" . $problems
);
-}
+//}