/cron.daily/apt-cacher-ng

http://github.com/brinkman83/bashrc · Shell · 19 lines · 7 code · 3 blank · 9 comment · 3 complexity · 8285dc41875cedc3c8175cb9424f7193 MD5 · raw file

  1. #!/bin/sh
  2. # Run the expire function of apt-cacher-ng non-interactively (unless errors
  3. # are detected).
  4. # optional, specify hostname to appear in error messages and links
  5. # HOSTNAME=externallyVisibleHostName
  6. # export HOSTNAME
  7. # optional, specify IP address to connect to
  8. # ACNGIP=10.0.1.3
  9. # export ACNGIP
  10. if perl -e 'use MIME::Base64' 2>/dev/null \
  11. && test -r /usr/lib/apt-cacher-ng/expire-caller.pl ;
  12. then
  13. perl /usr/lib/apt-cacher-ng/expire-caller.pl || echo Check error messages in /var/log/apt-cacher-ng/maint_*.log
  14. else
  15. 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
  16. fi