4759.3.1
by Tom Haddon
Mirror prober separated out from nightly.sh, some nightly.sh changes and rosetta config for forster |
1 |
#!/bin/sh
|
2 |
||
3 |
# This script runs the mirror prober scripts as the
|
|
4764
by Canonical.com Patch Queue Manager
[release-critical=kiko][!log] Mirror prober separated out from nightly.sh, some nightly.sh changes and rosetta config for forster |
4 |
# launchpad user every two hours. Typically the output
|
4759.3.1
by Tom Haddon
Mirror prober separated out from nightly.sh, some nightly.sh changes and rosetta config for forster |
5 |
# will be sent to an email address for inspection.
|
6 |
||
7 |
# Only run this script on forster
|
|
8 |
THISHOST=`uname -n` |
|
9 |
if [ "forster" != "$THISHOST" ] |
|
10 |
then
|
|
11 |
echo "This script must be run on forster." |
|
12 |
exit 1 |
|
13 |
fi
|
|
14 |
||
15 |
# Only run this as the launchpad user
|
|
16 |
USER=`whoami` |
|
17 |
if [ "launchpad" != "$USER" ] |
|
18 |
then
|
|
19 |
echo "Must be launchpad user to run this script." |
|
20 |
exit 1 |
|
21 |
fi
|
|
22 |
||
23 |
||
24 |
export LPCONFIG=production |
|
4759.3.2
by Tom Haddon
Set http_proxy |
25 |
export http_proxy=http://squid.internal:3128/ |
26 |
export ftp_proxy=http://squid.internal:3128/ |
|
4759.3.1
by Tom Haddon
Mirror prober separated out from nightly.sh, some nightly.sh changes and rosetta config for forster |
27 |
|
28 |
LOCK=/var/lock/launchpad_mirror_prober.lock |
|
29 |
lockfile -r0 -l 259200 $LOCK |
|
30 |
if [ $? -ne 0 ]; then |
|
31 |
echo Unable to grab $LOCK lock - aborting |
|
32 |
ps fuxwww |
|
33 |
exit 1 |
|
34 |
fi
|
|
35 |
||
36 |
cd /srv/launchpad.net/production/launchpad/cronscripts
|
|
37 |
||
38 |
echo '== Distribution mirror prober (archive)' `date` == |
|
5463.1.1
by Tom Haddon
Per RT 29602 altering mirror prober notifications |
39 |
python distributionmirror-prober.py --content-type=archive --max-mirrors=20 |
4759.3.1
by Tom Haddon
Mirror prober separated out from nightly.sh, some nightly.sh changes and rosetta config for forster |
40 |
|
41 |
echo '== Distribution mirror prober (cdimage)' `date` == |
|
5463.1.1
by Tom Haddon
Per RT 29602 altering mirror prober notifications |
42 |
python distributionmirror-prober.py --content-type=cdimage --max-mirrors=30 |
4759.3.1
by Tom Haddon
Mirror prober separated out from nightly.sh, some nightly.sh changes and rosetta config for forster |
43 |
|
44 |
rm -f $LOCK
|
|
45 |