Another apt-proxy bypass fix.
This commit is contained in:
parent
649e2714ad
commit
1eb1b2d13a
|
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -x
|
||||
set -e
|
||||
UBUNTU_CODENAME=bionic
|
||||
URL="brave-browser-apt-release.s3.brave.com"
|
||||
|
||||
|
|
@ -17,11 +18,16 @@ echo 'kernel.unprivileged_userns_clone=1' > /etc/sysctl.d/00-local-userns.conf
|
|||
#service procps restart
|
||||
|
||||
# Bypass apt-proxy for brave packages
|
||||
# if 02proxy exists check to see if the url is already in it, if so do nothing , if it isn't add it,
|
||||
# if 02proxy doesn't exist create it. successful grep 0, unsuccessful 1
|
||||
if [ -f /etc/apt/apt.conf.d/02proxy ]; then
|
||||
echo "02proxy contains: "
|
||||
cat /etc/apt/apt.conf.d/02proxy
|
||||
if [ ! -z $(grep ${URL}) ]; then
|
||||
if [ ! -z $(grep ${URL} /etc/apt/apt.conf.d/02proxy) ]; then
|
||||
echo "first"
|
||||
echo "Acquire::http::Proxy { \"${URL}\" DIRECT; };" >> /etc/apt/apt.conf.d/02proxy
|
||||
fi
|
||||
else
|
||||
echo "second"
|
||||
echo "Acquire::http::Proxy { \"${URL}\" DIRECT; };" >> /etc/apt/apt.conf.d/02proxy
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in New Issue