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
|
8687.15.7
by Karl Fogel
Add the copyright header block to more files. |
2 |
#
|
3 |
# Copyright 2009 Canonical Ltd. This software is licensed under the
|
|
4 |
# GNU Affero General Public License version 3 (see the file LICENSE).
|
|
4759.3.1
by Tom Haddon
Mirror prober separated out from nightly.sh, some nightly.sh changes and rosetta config for forster |
5 |
|
6 |
# 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 |
7 |
# 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 |
8 |
# will be sent to an email address for inspection.
|
9 |
||
7520.1.1
by Steve McInerney
Moving mirror-prober.sh script to run on loganberry |
10 |
# Only run this script on loganberry
|
4759.3.1
by Tom Haddon
Mirror prober separated out from nightly.sh, some nightly.sh changes and rosetta config for forster |
11 |
THISHOST=`uname -n` |
7520.1.1
by Steve McInerney
Moving mirror-prober.sh script to run on loganberry |
12 |
if [ "loganberry" != "$THISHOST" ] |
4759.3.1
by Tom Haddon
Mirror prober separated out from nightly.sh, some nightly.sh changes and rosetta config for forster |
13 |
then
|
7520.1.1
by Steve McInerney
Moving mirror-prober.sh script to run on loganberry |
14 |
echo "This script must be run on loganberry." |
4759.3.1
by Tom Haddon
Mirror prober separated out from nightly.sh, some nightly.sh changes and rosetta config for forster |
15 |
exit 1 |
16 |
fi
|
|
17 |
||
18 |
# Only run this as the launchpad user
|
|
19 |
USER=`whoami` |
|
20 |
if [ "launchpad" != "$USER" ] |
|
21 |
then
|
|
22 |
echo "Must be launchpad user to run this script." |
|
23 |
exit 1 |
|
24 |
fi
|
|
25 |
||
26 |
||
27 |
export LPCONFIG=production |
|
4759.3.2
by Tom Haddon
Set http_proxy |
28 |
export http_proxy=http://squid.internal:3128/ |
29 |
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 |
30 |
|
31 |
LOCK=/var/lock/launchpad_mirror_prober.lock |
|
32 |
lockfile -r0 -l 259200 $LOCK |
|
33 |
if [ $? -ne 0 ]; then |
|
34 |
echo Unable to grab $LOCK lock - aborting |
|
35 |
ps fuxwww |
|
36 |
exit 1 |
|
37 |
fi
|
|
38 |
||
39 |
cd /srv/launchpad.net/production/launchpad/cronscripts
|
|
40 |
||
41 |
echo '== Distribution mirror prober (archive)' `date` == |
|
10637.3.7
by Guilherme Salgado
merge devel |
42 |
python -S 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 |
43 |
|
44 |
echo '== Distribution mirror prober (cdimage)' `date` == |
|
10637.3.7
by Guilherme Salgado
merge devel |
45 |
python -S 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 |
46 |
|
47 |
rm -f $LOCK
|
|
48 |