Merge pull request #44 from TheBoiCJ/patch-1

Make region dynamic
This commit is contained in:
Gabriel Luchina 2024-12-16 15:25:12 -03:00 committed by GitHub
commit ea8f2ba910
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 4 deletions

View File

@ -13,8 +13,8 @@ clear
if [ -e /root/OSX-PROXMOX ]; then rm -rf /root/OSX-PROXMOX; fi; if [ -e /root/OSX-PROXMOX ]; then rm -rf /root/OSX-PROXMOX; fi;
if [ -e /etc/apt/sources.list.d/pve-enterprise.list ]; then rm -rf /etc/apt/sources.list.d/pve-enterprise.list; fi; if [ -e /etc/apt/sources.list.d/pve-enterprise.list ]; then rm -rf /etc/apt/sources.list.d/pve-enterprise.list; fi;
if [ -e /etc/apt/sources.list.d/ceph.list ]; then rm -rf /etc/apt/sources.list.d/ceph.list; fi; if [ -e /etc/apt/sources.list.d/ceph.list ]; then rm -rf /etc/apt/sources.list.d/ceph.list; fi;
# Is this better?
echo "Waiting install OSX-PROXMOX..." echo "Waiting to install OSX-PROXMOX..."
echo " " echo " "
apt update > /tmp/install-osx-proxmox.log 2>> /tmp/install-osx-proxmox.log apt update > /tmp/install-osx-proxmox.log 2>> /tmp/install-osx-proxmox.log
@ -25,8 +25,10 @@ then
echo "Error with 'apt-get update' ..." echo "Error with 'apt-get update' ..."
echo "Trying to change /etc/apt/sources.list" echo "Trying to change /etc/apt/sources.list"
echo " " echo " "
# Always using a Brazilian server will not be fast...
sed -i 's/ftp.br.debian.org/ftp.debian.org/g' /etc/apt/sources.list # I suggest using the users home country, As it will always be faster.
Country=$(curl -s https://ipinfo.io/country | tr '[:upper:]' '[:lower:]')
sed -i "s/ftp.$Country.debian.org/ftp.debian.org/g" /etc/apt/sources.list
echo "Retrying 'apt-get update' ..." echo "Retrying 'apt-get update' ..."
echo " " echo " "