From b59d74f0fd2562d6f484d3a13b40f9728f17f917 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20K=C3=B6pferl?= Date: Fri, 16 Apr 2021 19:00:01 +0200 Subject: [PATCH] =?UTF-8?q?apt=20proxy=20hei=C3=9Ft=20er?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kubuntu/kubuntu_late_command.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/kubuntu/kubuntu_late_command.sh b/kubuntu/kubuntu_late_command.sh index 5b5112a..3eb9093 100644 --- a/kubuntu/kubuntu_late_command.sh +++ b/kubuntu/kubuntu_late_command.sh @@ -10,9 +10,13 @@ export DEBIAN_FRONTEND=noninteractive DPKG_CFG_FRAGMENT=/etc/dpkg/dpkg.cfg.d/non-interactive # 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 +ping -c 1 apt-proxy +if [ "$?" -eq "0" ]; then + echo 'Acquire::https::Proxy "http://apt-proxy:3142";' > /etc/apt/apt.conf.d/01aptproxy + echo 'Acquire::http::Proxy "http://apt-proxy:3142";' >> /etc/apt/apt.conf.d/01aptproxy + e "Proxy Apt-Aktiv" +else + e "Kein Apt-Proxy" fi # Linux distro