-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmkarchivesize1
executable file
·159 lines (143 loc) · 7.01 KB
/
mkarchivesize1
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
#!/bin/sh
cd /local/web/hosts/archive.browsers.evolt.org/
echo "<?php" > /local/web/hosts/browsers.evolt.org/archivesize.inc
echo -n "\$archivesize = " >> /local/web/hosts/browsers.evolt.org/archivesize.inc
echo -n `du -schm /local/web/hosts/archive.browsers.evolt.org/ | head -1 | cut -d"/" -f1` >> /local/web/hosts/browsers.evolt.org/archivesize.inc
echo ";" >> /local/web/hosts/browsers.evolt.org/archivesize.inc
echo -n "\$archivelastupdated = \"" >> /local/web/hosts/browsers.evolt.org/archivesize.inc
echo -n `find -type d -printf "%TY-%Tm-%Td %TH:%TM:%TS %TZ\n" | sort -r | head -1` >> /local/web/hosts/browsers.evolt.org/archivesize.inc
echo -n `find -type d -printf "%TY-%Tm-%Td %TH:%TM:%TS %TZ\n" | sort -r | head -1` > lastupdated.txt
echo "\";" >> /local/web/hosts/browsers.evolt.org/archivesize.inc
echo "?>" >> /local/web/hosts/browsers.evolt.org/archivesize.inc
echo `ls -1 | grep -v robots.txt | grep -v lastupdated.txt | grep -v index.html | wc -l` > /local/web/hosts/browsers.evolt.org/archivecount.inc
cd /local/web/hosts/browsers.evolt.org/mirrors
echo 200 > checks/master-http.status
cat /local/web/hosts/archive.browsers.evolt.org/lastupdated.txt > checks/master-http.inc
if [ -r sites/planetmirror.com/disable ]
then
echo "Mirror disabled" > checks/planetmirror.com-http.inc
else
curl --silent --max-time 10 --connect-timeout 10 --head http://public.planetmirror.com/pub/browsers/lastupdated.txt > checks/planetmirror.com-http.status
if [ "`grep 404 checks/planetmirror.com-http.status | grep HTTP`" = "" ]
then
curl --silent --max-time 10 --connect-timeout 10 http://public.planetmirror.com/pub/browsers/lastupdated.txt > checks/planetmirror.com-http.inc
else
echo "Data unavailable" > checks/planetmirror.com-http.inc
fi
fi
if [ -r sites/flirble.org/disable ]
then
echo "Mirror disabled" > checks/flirble-http.inc
else
curl --silent --max-time 10 --connect-timeout 10 --head http://uk.evolt.m.flirble.org/lastupdated.txt > checks/flirble-http.status
if [ "`grep 404 checks/flirble-http.status | grep HTTP`" = "" ]
then
curl --silent --max-time 10 --connect-timeout 10 http://uk.evolt.m.flirble.org/lastupdated.txt > checks/flirble-http.inc
else
echo "Data unavailable" > checks/flirble-http.inc
fi
fi
if [ -r sites/webhack.com/disable ]
then
echo "Mirror disabled" > checks/webhack-http.inc
else
curl --silent --max-time 10 --connect-timeout 10 --head http://browsers.webhack.com/lastupdated.txt > checks/webhack-http.status
if [ "`grep 404 checks/webhack-http.status | grep HTTP`" = "" ]
then
curl --silent --max-time 10 --connect-timeout 10 http://browsers.webhack.com/lastupdated.txt > checks/webhack-http.inc
else
echo "Data unavailable" > checks/webhack-http.inc
fi
fi
if [ -r sites/gosume.com/disable ]
then
echo "Mirror disabled" > checks/gosume-http.inc
else
curl --silent --max-time 10 --connect-timeout 10 --head http://browsers.gosume.com/browsers/lastupdated.txt > checks/gosume-http.status
if [ "`grep 404 checks/gosume-http.status | grep HTTP`" = "" ]
then
curl --silent --max-time 10 --connect-timeout 10 http://browsers.gosume.com/browsers/lastupdated.txt > checks/gosume-http.inc
else
echo "Data unavailable" > checks/gosume-http.inc
fi
fi
if [ -r sites/fuseware.com/disable ]
then
echo "Mirror disabled" > checks/fuseware-http.inc
else
curl --silent --max-time 10 --connect-timeout 10 --head http://browsers.fuseware.com/lastupdated.txt > checks/fuseware-http.status
if [ "`grep 404 checks/fuseware-http.status | grep HTTP`" = "" ]
then
curl --silent --max-time 10 --connect-timeout 10 http://browsers.fuseware.com/lastupdated.txt > checks/fuseware-http.inc
else
echo "Data unavailable" > checks/fuseware-http.inc
fi
fi
# curl --silent --max-time 10 --connect-timeout 10 --head http://evolt.2dhosting.com/lastupdated.txt > checks/2dhosting-http.status
# if [ "`grep 404 checks/2dhosting-http.status | grep HTTP`" = "" ]
# then
# curl --silent --max-time 10 --connect-timeout 10 http://evolt.2dhosting.com/lastupdated.txt > checks/2dhosting-http.inc
# else
# echo "Data unavailable" > checks/2dhosting-http.inc
# fi
echo "Mirror closed" > checks/2dhosting-http.inc
if [ -r sites/mirror.ac.uk/disable ]
then
echo "Mirror disabled" > checks/mirroracuk-http.inc
else
curl --silent --max-time 10 --connect-timeout 10 --head http://download.mirror.ac.uk/mirror/ftp.evolt.org/lastupdated.txt > checks/mirroracuk-http.status
if [ "`grep 404 checks/mirroracuk-http.status | grep HTTP`" = "" ]
then
curl --silent --max-time 10 --connect-timeout 10 http://download.mirror.ac.uk/mirror/ftp.evolt.org/lastupdated.txt > checks/mirroracuk-http.inc
else
echo "Data unavailable" > checks/mirroracuk-http.inc
fi
fi
if [ -r sites/mirrorservice.org/disable ]
then
echo "Mirror disabled" > checks/mirrorservice-http.inc
else
curl --silent --max-time 10 --connect-timeout 10 --head http://www.mirrorservice.org/sites/browsers.evolt.org/browsers/lastupdated.txt > checks/mirrorservice-http.status
if [ "`grep 404 checks/mirrorservice-http.status | grep HTTP`" = "" ]
then
curl --silent --max-time 10 --connect-timeout 10 http://www.mirrorservice.org/sites/browsers.evolt.org/browsers/lastupdated.txt > checks/mirrorservice-http.inc
else
echo "Data unavailable" > checks/mirrorservice-http.inc
fi
fi
if [ -r sites/evolt.winworldpc.com/disable ]
then
echo "Mirror disabled" > checks/evolt.winworldpc.com-http.inc
else
curl --silent --max-time 10 --connect-timeout 10 --head http://evolt.winworldpc.com/lastupdated.txt > checks/evolt.winworldpc.com-http.status
if [ "`grep 404 checks/evolt.winworldpc.com-http.status | grep HTTP`" = "" ]
then
curl --silent --max-time 10 --connect-timeout 10 http://evolt.winworldpc.com/lastupdated.txt > checks/evolt.winworldpc.com-http.inc
else
echo "Data unavailable" > checks/evolt.winworldpc.com-http.inc
fi
fi
if [ -r sites/browsers-us.mirrors.zensoft.net/disable ]
then
echo "Mirror disabled" > checks/browsers-us.mirrors.zensoft.net-http.inc
else
curl --silent --max-time 10 --connect-timeout 10 --head http://browsers-us.mirrors.zensoft.net/lastupdated.txt > checks/browsers-us.mirrors.zensoft.net-http.status
if [ "`grep 404 checks/browsers-us.mirrors.zensoft.net-http.status | grep HTTP`" = "" ]
then
curl --silent --max-time 10 --connect-timeout 10 http://browsers-us.mirrors.zensoft.net/lastupdated.txt > checks/browsers-us.mirrors.zensoft.net-http.inc
else
echo "Data unavailable" > checks/browsers-us.mirrors.zensoft.net-http.inc
fi
fi
if [ -r sites/browsers-fr.mirrors.zensoft.net/disable ]
then
echo "Mirror disabled" > checks/browsers-fr.mirrors.zensoft.net-http.inc
else
curl --silent --max-time 10 --connect-timeout 10 --head http://browsers-fr.mirrors.zensoft.net/lastupdated.txt > checks/browsers-fr.mirrors.zensoft.net-http.status
if [ "`grep 404 checks/browsers-fr.mirrors.zensoft.net-http.status | grep HTTP`" = "" ]
then
curl --silent --max-time 10 --connect-timeout 10 http://browsers-fr.mirrors.zensoft.net/lastupdated.txt > checks/browsers-fr.mirrors.zensoft.net-http.inc
else
echo "Data unavailable" > checks/browsers-fr.mirrors.zensoft.net-http.inc
fi
fi