From c9b64f029aaf53369686da885f0b141c6ca30443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20K=C3=B6pferl?= Date: Wed, 7 Apr 2021 14:16:18 +0200 Subject: [PATCH] =?UTF-8?q?Bedingte=20Ausf=C3=BChrung=20von=20Apt-proxy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kubuntu/kubuntu_late_command.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kubuntu/kubuntu_late_command.sh b/kubuntu/kubuntu_late_command.sh index a80fa54..5b5112a 100644 --- a/kubuntu/kubuntu_late_command.sh +++ b/kubuntu/kubuntu_late_command.sh @@ -9,11 +9,11 @@ export DEBIAN_FRONTEND=noninteractive DPKG_CFG_FRAGMENT=/etc/dpkg/dpkg.cfg.d/non-interactive -# ChCh apt proxy benutzen - -echo 'Acquire::https::Proxy "http://172.23.92.240:3142";' > /etc/apt/apt.conf.d/01aptproxy -echo 'Acquire::http::Proxy "http://172.23.92.240:3142";' >> /etc/apt/apt.conf.d/01aptproxy - +# ChCh apt proxy benutzen (bedingt = wenn da) +if [ ping -n 1 apt-cache ]; then + echo 'Acquire::https::Proxy "http://apt-cache:3142";' > /etc/apt/apt.conf.d/01aptproxy + echo 'Acquire::http::Proxy "http://apt-cache:3142";' >> /etc/apt/apt.conf.d/01aptproxy +fi # Linux distro script_distro='Kubuntu Linux 20.4.0'