Update repo check (#2686)

Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
This commit is contained in:
Daniel Hansson
2024-09-23 20:23:04 +02:00
committed by GitHub
parent f419c90cef
commit f0e261c9ff
2 changed files with 1 additions and 1 deletions

1
lib.sh
View File

@ -45,7 +45,6 @@ SYSVENDOR=$(cat /sys/devices/virtual/dmi/id/sys_vendor)
# Network
IFACE=$(ip r | grep "default via" | awk '{print $5}')
IFACE2=$(ip -o link show | awk '{print $2,$9}' | grep 'UP' | cut -d ':' -f 1)
REPO=$(grep "^deb " /etc/apt/sources.list | grep http | awk '{print $2}' | head -1)
ADDRESS=$(hostname -I | cut -d ' ' -f 1)
WANIP4=$(curl -s -k -m 5 -4 https://api64.ipify.org)
INTERFACES="/etc/netplan/nextcloud.yaml"

View File

@ -37,6 +37,7 @@ else
fi
# Get the correct apt-mirror
REPO=$(grep "URIs:" $(find /etc/apt/ -type f -name "*sources*") | grep http | awk '{print $2}' | head -1)
if [ "$REPO" = 'http://archive.ubuntu.com/ubuntu' ]
then
MIRROR_SWITCH="ON"