Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #182202

Re: apt-cacher-ng related program and package suggestion

From Bob Weber <bobrweber@gmail.com>
Newsgroups linux.debian.user
Subject Re: apt-cacher-ng related program and package suggestion
Date 2017-06-15 16:50 +0200
Message-ID <tSEfT-3Hl-17@gated-at.bofh.it> (permalink)
References <tSmCl-X4-1@gated-at.bofh.it> <tSDMR-3vs-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw




> Simple workaround for now:
>
> /etc/apt/sources.list:
> ----
> deb http://site1.ip.address/debian jessie-backports main
> #deb http://site2.ip.address/debian jessie-backports main
> ----
>
> Now just change the comment from one to the other, run apt-get
> update and go.
>
> Second workaround, if you have lots of entries to be switched:
> create two sources.list files, named home.list and uni.list.
>
> When you move from place to place, copy the appropriate one 
> in to /etc/apt/sources.list and run apt-get update.
>
> -dsr-
>
Its even easier than that.  Don't mess with the .list files just change  the file

/etc/apt/apt.conf.d/000apt-cacher-ng-proxy

according to the login.

The contents of that file is just the address/port of the apt-cacher-ng server.

Acquire::http::Proxy "http://172.16.0.1:3142/";

Just write a script to check what network you are on.  Like ping the
apt-cacher-ng server(s) until a response is sent and set 
/etc/apt/apt.conf.d/000apt-cacher-ng-proxy accordingly.

Try the following line with your own existing and non existing ips.

for f in 172.16.0.1 172.16.0.2 172.16.0.33; do if ping -c3 $f; then echo $f
yes;else echo $f no;fi; done

bob

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

apt-cacher-ng related program and package suggestion "tuxderlinuxfuchs77@gmail.com" <tuxderlinuxfuchs77@gmail.com> - 2017-06-14 22:00 +0200
  Re: apt-cacher-ng related program and package suggestion Andy Smith <andy@strugglers.net> - 2017-06-15 05:00 +0200
    Re: apt-cacher-ng related program and package suggestion Yvan Masson <yvan.masson@openmailbox.org> - 2017-06-15 08:50 +0200
      Re: apt-cacher-ng related program and package suggestion Yvan Masson <yvan.masson@openmailbox.org> - 2017-06-16 09:40 +0200
  Re: apt-cacher-ng related program and package suggestion Dan Ritter <dsr@randomstring.org> - 2017-06-15 16:20 +0200
    Re: apt-cacher-ng related program and package suggestion Darac Marjal <mailinglist@darac.org.uk> - 2017-06-15 16:30 +0200
    Re: apt-cacher-ng related program and package suggestion David Wright <deblis@lionunicorn.co.uk> - 2017-06-15 16:40 +0200
      Re: apt-cacher-ng related program and package suggestion "tuxderlinuxfuchs77@gmail.com" <tuxderlinuxfuchs77@gmail.com> - 2017-06-15 16:50 +0200
        Re: apt-cacher-ng related program and package suggestion David Wright <deblis@lionunicorn.co.uk> - 2017-06-15 19:00 +0200
    Re: apt-cacher-ng related program and package suggestion Bob Weber <bobrweber@gmail.com> - 2017-06-15 16:50 +0200
      Re: apt-cacher-ng related program and package suggestion Dan Ritter <dsr@randomstring.org> - 2017-06-16 17:50 +0200
  Re: apt-cacher-ng related program and package suggestion Eduard Bloch <edi@gmx.de> - 2017-06-16 17:40 +0200

csiph-web