aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/README.md
blob: 4217dc082785a4bb53f4061ebe7f77ebfa7f1ee3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
Lua script for checking the health of Devuan Linux package mirrors.

This is currently under development, not everything has been written yet.

mirror-checker-lua is a Lua script used by the Devuan mirror admins
(maybe, if they like it) to check the health of Devuan Linux package
mirrors.  Originally there was bash scripts for this job, then Evilham
wrote some Python scripts, now onefang has written it in Lua.  We all
have different tastes in languages.  lol

The main difference is that this Lua version tries to do everything, and
will be maintained.  Currently the shell scripts and Python scripts are
actually being used I think.  Evilham asked me to write this, after I
badgered him about his Python scripts.

The source code is at [https://sledjhamr.org/cgit/mirror-checker-lua/]

The issue tracker is at [https://sledjhamr.org/mantisbt/project_page.php?project_id=13]


Installation.
-------------

Download the source.  You may want to put the actual mirror-checker.lua
in someplace liku /usr/local/bin and make sure it is executable.

It should run on any recent Linux, you'll need to have the following
installed -

Luajit

wget

dig, part of BIND.  On Debian based systems it'll be in the dnsutils
package.

LuaSocket, on Debian based systems it'll be in the lua-socket package.

ionice, on Debian based systems it'll be in the util-linux package.


Using it.
---------

These examples assume you are running it from the source code directory. 
A directory will be created called results, it'll be full of log files
and any files that get downloaded.  There will also be results/email and
results/web directories, with the notification email and web pages with
the easy to read emails (once I write that bit).

Note that unlike typical commands, you can't run single character options
together, so this is wrong -

```Shell Session
$ ./mirror-checker.lua -vvv
```

Instead do this -

```Shell Session
$ ./mirror-checker.lua -v -v -v
```

Just run the script to do all of the tests -

```Shell Session
$ ./mirror-checker.lua
```

Which will print any errors.  If you don't want to see errors -

```Shell Session
$ ./mirror-checker.lua -q
```

If you want to see warnings to (as usual, the more -v options, the more
details) -

```Shell Session
$ ./mirror-checker.lua -v
```

Or use the usual options for the help and version number -

```Shell Session
$ ./mirror-checker.lua -h 
$ ./mirror-checker.lua --help
$ ./mirror-checker.lua --version
```

To run the tests on a specific mirror, for example pkgmaster.devuan.org -

```Shell Session
$ ./mirror-checker.lua pkgmaster.devuan.org
```

You can use the --tests option to tune which tests are run, for example
to stop IPv6 tests, coz you don't have IPv6 -

```Shell Session
$ ./mirror-checker.lua --tests=-IPv6
```

To do the same, but not run the HTTPS tests either -

```Shell Session
$ ./mirror-checker.lua --tests=-IPv6,-https
```

To only run the http integrity tests, only on IPv6 -

```Shell Session
$ ./mirror-checker.lua --tests=http,Integrity,IPv6
```