Skip to content
Snippets Groups Projects
Commit f688815c authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Fixed APT cache url (refs #20417).

parent e6ec9205
No related branches found
No related tags found
No related merge requests found
......@@ -52,7 +52,7 @@ server {
}
# APT proxy
location /apt {
location ~ ^/apt/(http|https)/([\w\.\-\_]+.ubuntu.com/ubuntu|panel.ubicast.eu/packaging/apt)/(.*)$ {
location ~ ^/apt/(http|https)/([\w\.\-\_]+.ubuntu.com/ubuntu|ftp.debian.org/debian|mozilla.debian.net|panel.ubicast.eu/packaging/apt)/(.*)$ {
resolver 127.0.0.1;
proxy_pass $1://$2/$3;
proxy_cache uc-apt-cache;
......
......@@ -15,10 +15,10 @@ if ( rgrep '14.04' /etc/lsb-release >/dev/null ); then
fi
# modify sources.list to use ubicast cache
if ( ! test -z ${APT_CACHE_HOST} ); then
if ( ! grep "${APT_CACHE_HOST}" /etc/apt/sources.list >/dev/null ); then
echo "Updating /etc/apt/sources.list to use cache ${APT_CACHE_HOST}."
sed -i "s@http://@http://${APT_CACHE_HOST}/@" /etc/apt/sources.list
if ( ! test -z ${APT_CACHE_URL} ); then
if ( ! grep "${APT_CACHE_URL}" /etc/apt/sources.list >/dev/null ); then
echo "Updating /etc/apt/sources.list to use cache ${APT_CACHE_URL}."
sed -i "s@http://@${APT_CACHE_URL}@" /etc/apt/sources.list
fi
fi
......
......@@ -22,7 +22,7 @@ NTP_SERVER='ntp.ubuntu.com'
SSL_CERTIFICATE='/etc/ssl/certs/ssl-cert-snakeoil.pem'
SSL_CERTIFICATE_KEY='/etc/ssl/private/ssl-cert-snakeoil.key'
# APT sources
APT_CACHE_HOST=
APT_CACHE_URL=
# -- Shell --
# ubicast shell account
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment