#!/bin/sh # Check the mirrors # Author: Bobylev Aleksej , 2016-2017 # Head cat < Check SliTaz Mirrors

SliTaz Mirrors

This service allows you to check the current status of the SliTaz mirrors, as well as view the update log and cases of unavailability of mirror servers.

Note, mirror1.slitaz.org is the primary mirror, all the rest of mirrors is synchronized with it. It seems that the mirrors have a certain schedule to check for updates.

EOT # Current state cat <The current state of servers EOT [ "$(tail -n+2 ./check.date)" != 'finished' ] && echo '(checking in progress!)' cat <

Legend for the “Freshness” column:

  •  — server is synchronized with the mirror1 now;
  •  — server is synchronized with the previous state of mirror1;
  •  — server synchronization is unsatisfactory.
EOT datetime1=$(tac ./log | awk '{if($3=="a"&&NF==5){s++;if(s==1)print $4$5}}') datetime2=$(tac ./log | awk '{if($3=="a"&&NF==5){s++;if(s==2)print $4$5}}') awk -vdt1="$datetime1" -vdt2="$datetime2" ' { printf("", $1); printf("", $1, $1); printf("", $1, $2); if ($3$4==dt1) sign="starred" else if ($3$4==dt2) sign="semi-starred" else sign="non-starred"; printf(""); }' ./status cat <
LogServer      FreshnessAccess
  %s  %s", sign, $3, $4); split($5, u, "|"); prot1 = (index(u[1], "http://")) ? "http" : "ftp"; printf("[%s] ", u[1], prot1); if (u[2] != ".") { prot2 = (index(u[2], "http://")) ? "http" : "ftp"; printf("[%s] ", u[2], prot2); } printf("
 
  EOT # Log cat <Changelog of servers status

Select servers in the table above to see them in the log. Also specify whether you want to see cases of unavailability of servers.

The following list in reverse order (the higher the later).

EOT tac ./log | awk '{ u = (NF==3) ? " u" : ""; printf("", $3, u); printf("", $1, $2); if ($3=="a") n = "mirror1.slitaz.org"; if ($3=="b") n = "mirror.slitaz.org"; if ($3=="c") n = "gtlib.gatech.edu"; if ($3=="d") n = "download.tuxfamily.org"; if ($3=="e") n = "malibu.tuxfamily.net"; if ($3=="f") n = "mathematik.tu-darmstadt.de"; if ($3=="g") n = "distro.ibiblio.org"; # if ($3=="h") n = "mirror.switch.ch"; # if ($3=="i") n = "rz.uni-kiel.de"; if ($3=="j") n = "uni-stuttgart.de"; if ($3=="k") n = "slitaz.c3sl.ufpr.br"; # if ($3=="n") n = "opensuse.c3sl.ufpr.br"; if ($3=="l") n = "icm.edu.pl"; # if ($3=="m") n = "br.debian.org"; # if ($3=="o") n = "slitaz.mirror.garr.it"; # if ($3=="p") n = "archlinuxvn.org"; printf("", n); if (NF==3) { printf(""); } else { printf("", $4, $5); } printf(""); }' cat <
UTCServerTimestamp
%s %s%sunavailable%s %s
EOT