mirror of
https://github.com/nextcloud/vm.git
synced 2025-08-16 16:04:36 +00:00
Update repo check (#2686)
Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
This commit is contained in:
1
lib.sh
1
lib.sh
@ -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"
|
||||
|
@ -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"
|
||||
|
Reference in New Issue
Block a user