Debian Codegraph @

contrib/apt-cacher-ng-mirror

raw
1 #!/bin/sh
2 # Sample script for execution as part of a cron job
3 # Triggers precaching of remote contents, see manual for details
4
5 # optional, specify hostname to appear in error messages and links
6 # HOSTNAME=externallyVisibleHostName
7 # export HOSTNAME
8
9 # optional, specify IP address to connect to
10 # ACNGIP=10.0.1.3
11 # export ACNGIP
12
13 ACNGREQ='?doDownload=dd&asNeeded=an&useDebDelta=ud&doMirror=Start+Mirroring'
14 export ACNGREQ
15
16 if perl -e 'use MIME::Base64' 2>/dev/null \
17 && test -r /usr/lib/apt-cacher-ng/expire-caller.pl ;
18 then
19 perl /usr/lib/apt-cacher-ng/expire-caller.pl || echo Please check error messages in one of: $(ls -t /var/log/apt-cacher-ng/maint*.log.html | head -n5)
20 else
21 echo $(date -R)\|/etc/cron.daily/apt-cacher-ng\| Error starting expiration helper. Install the perl package, check apt-cacher-ng installation. >> /var/log/apt-cacher-ng/apt-cacher.err
22 fi