Ubuntu 10.4 Lucid – Configuration of apt-cacher-ng Mobile Clients


In a previous post I configured Ubuntu Server as an apt proxy using apt-cahcher-ng, but had only configured my servers to use the proxy.

There are various ways of configuring mobile clients to enable and disable their apt proxy configuration. I chose to create a couple of bash scripts and a couple of launchers so that I could easily enable and disable my laptops’ connection to the proxy.

In my home directory I created the following files – enableproxy.sh, disableproxy.sh and 02proxy.

enableproxy.sh

#!/bin/bash
sudo cp 02proxy /etc/apt/apt.conf.d/02proxy

disableproxy.sh

#!/bin/bash
sudo rm /etc/apt/apt.conf.d/02proxy

02proxy

Acquire::http { Proxy "http://server-ip:3142"; };

The next step is to create a launcher for enableproxy.sh and disableproxy.sh.

Right click the desktop and then click Create Launcher. Click the Type drop-down menu and select Application in Terminal. Enter a Name for the Launcher. Click the Browse button and select enableproxy.sh. Click OK.

Repeat this process and create a Launcher for disableproxy.sh.

This manual process allows me to keep my proxy configured 99% of the time and be able to quickly disable it when my laptop is away from home.

Advertisements

One thought on “Ubuntu 10.4 Lucid – Configuration of apt-cacher-ng Mobile Clients

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s