File: apt-cacher-ng-mirror

package info (click to toggle)
apt-cacher-ng 3.3.1-2~bpo10+1
  • links: PTS, VCS
  • area: main
  • in suites: buster-backports
  • size: 2,040 kB
  • sloc: cpp: 17,564; sh: 553; ansic: 401; perl: 377; makefile: 126
file content (22 lines) | stat: -rwxr-xr-x 878 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
# Sample script for execution as part of a cron job
# Triggers precaching of remote contents, see manual for details

# optional, specify hostname to appear in error messages and links
# HOSTNAME=externallyVisibleHostName
# export HOSTNAME

# optional, specify IP address to connect to
# ACNGIP=10.0.1.3
# export ACNGIP

ACNGREQ='?doDownload=dd&asNeeded=an&useDebDelta=ud&doMirror=Start+Mirroring'
export ACNGREQ

if perl -e 'use MIME::Base64' 2>/dev/null \
   && test -r /usr/lib/apt-cacher-ng/expire-caller.pl ;
then
   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)
else
   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
fi