~andreserl/maas/maintain_squiddebproxy_compat

« back to all changes in this revision

Viewing changes to debian/maas-proxy.maas-proxy.upstart

  • Committer: MaaS Lander
  • Author(s): Andres Rodriguez
  • Date: 2014-09-22 08:32:39 UTC
  • mfrom: (306.1.4 packaging)
  • Revision ID: maas_lander-20140922083239-w9cuuumlk3dwlk7t
[r=andreserl,gmb][bug=][author=andreserl] Replace squid-deb-proxy; run our own proxy.  Places a proxy on port 8000 for backwards compatibility, but also provides a transparent proxy if iptables are configured for such case.

This that can be done in MAAS is to generate a maas-proxy template that configures the proxy in different ways, including allowing only networks that MAAS manages, instead of all.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# maas-proxy - a caching proxy
 
2
#
 
3
 
 
4
description "maas-proxy"
 
5
 
 
6
start on (local-filesystems and net-device-up IFACE!=lo)
 
7
stop on runlevel [!2345]
 
8
 
 
9
pre-start script
 
10
    . /usr/share/maas/maas-proxy-common.sh
 
11
    pre_start
 
12
end script
 
13
 
 
14
script
 
15
  if [ -x /usr/sbin/squid ]; then
 
16
      SQUID=/usr/sbin/squid
 
17
  elif  [ -x /usr/sbin/squid3 ]; then
 
18
      SQUID=/usr/sbin/squid3
 
19
  else
 
20
      echo "No squid binary found"
 
21
      exit 1
 
22
  fi
 
23
  exec $SQUID -N -f /etc/maas/maas-proxy.conf
 
24
end script