diff --git a/nextcloud-startup-script.sh b/nextcloud-startup-script.sh index acf170b1..fe27c9fd 100644 --- a/nextcloud-startup-script.sh +++ b/nextcloud-startup-script.sh @@ -71,7 +71,7 @@ fi # Check where the best mirrors are and update echo echo "Some VPS providers have local download mirrors preconfigured, some don't." -REPO=$(apt-cache policy | grep -m1 http| awk '{ print $2}') +REPO=$(apt-get update | grep -m 1 Hit | awk '{ print $2}') echo -e "Your current server repository is: \e[36m$REPO\e[0m" function ask_yes_or_no() { read -p "$1 ([y]es or [N]o): " diff --git a/nextcloud_install_production.sh b/nextcloud_install_production.sh index 814e40ee..e5eaaf6c 100644 --- a/nextcloud_install_production.sh +++ b/nextcloud_install_production.sh @@ -188,7 +188,7 @@ apt install language-pack-en-base -y sudo locale-gen "sv_SE.UTF-8" && sudo dpkg-reconfigure --frontend=noninteractive locales # Check where the best mirrors are and update -REPO=$(apt-cache policy | grep -m1 http| awk '{ print $2}') +REPO=$(apt-get update | grep -m 1 Hit | awk '{ print $2}') echo -e "Your server repository is:  \e[36m$REPO\e[0m" function ask_yes_or_no() { read -p "$1 ([y]es or [N]o): "