Fix mirror bug for non-raspi devices

This commit is contained in:
Taylor Helsper 2020-07-06 20:43:28 -05:00
parent dc92460428
commit 6803dccccb
2 changed files with 10 additions and 10 deletions

View File

@ -34,11 +34,10 @@ DEBIAN_VERSION=$(lsb_release -c | awk '{ print $2 }')
grep -qxF "deb https://deb.torproject.org/torproject.org ${DEBIAN_VERSION} main" /etc/apt/sources.list || echo "deb https://deb.torproject.org/torproject.org ${DEBIAN_VERSION} main" >> /etc/apt/sources.list
grep -qxF "deb-src https://deb.torproject.org/torproject.org ${DEBIAN_VERSION} main" /etc/apt/sources.list || echo "deb-src https://deb.torproject.org/torproject.org ${DEBIAN_VERSION} main" >> /etc/apt/sources.list
# Raspbian mirrors
grep -qxF "deb http://plug-mirror.rcac.purdue.edu/raspbian/ ${DEBIAN_VERSION} main" /etc/apt/sources.list || echo "deb http://plug-mirror.rcac.purdue.edu/raspbian/ ${DEBIAN_VERSION} main" >> /etc/apt/sources.list
grep -qxF "deb http://mirrors.ocf.berkeley.edu/raspbian/raspbian ${DEBIAN_VERSION} main" /etc/apt/sources.list || echo "deb http://mirrors.ocf.berkeley.edu/raspbian/raspbian ${DEBIAN_VERSION} main" >> /etc/apt/sources.list
grep -qxF "deb http://mirror.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian ${DEBIAN_VERSION} main" /etc/apt/sources.list || echo "deb http://mirror.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian ${DEBIAN_VERSION} main" >> /etc/apt/sources.list
grep -qxF "deb http://mirror.netcologne.de/raspbian/raspbian/ ${DEBIAN_VERSION} main" /etc/apt/sources.list || echo "deb http://mirror.netcologne.de/raspbian/raspbian/ ${DEBIAN_VERSION} main" >> /etc/apt/sources.list
if [ $IS_RASPI = 1 ]; then
grep -qxF "deb http://plug-mirror.rcac.purdue.edu/raspbian/ ${DEBIAN_VERSION} main" /etc/apt/sources.list || echo "deb http://plug-mirror.rcac.purdue.edu/raspbian/ ${DEBIAN_VERSION} main" >> /etc/apt/sources.list
grep -qxF "deb http://mirrors.ocf.berkeley.edu/raspbian/raspbian ${DEBIAN_VERSION} main" /etc/apt/sources.list || echo "deb http://mirrors.ocf.berkeley.edu/raspbian/raspbian ${DEBIAN_VERSION} main" >> /etc/apt/sources.list
fi
# Import Keys
set +e
@ -580,6 +579,7 @@ rm -f /etc/update-motd.d/98-armbian-autoreboot-warn || true
apt-get clean
# Enable any new/required services
systemctl enable docker
systemctl enable bitcoind
systemctl enable lnd
systemctl enable firewall

View File

@ -93,11 +93,10 @@ DEBIAN_VERSION=$(lsb_release -c | awk '{ print $2 }')
grep -qxF "deb https://deb.torproject.org/torproject.org ${DEBIAN_VERSION} main" /etc/apt/sources.list || echo "deb https://deb.torproject.org/torproject.org ${DEBIAN_VERSION} main" >> /etc/apt/sources.list
grep -qxF "deb-src https://deb.torproject.org/torproject.org ${DEBIAN_VERSION} main" /etc/apt/sources.list || echo "deb-src https://deb.torproject.org/torproject.org ${DEBIAN_VERSION} main" >> /etc/apt/sources.list
# Raspbian mirrors
grep -qxF "deb http://plug-mirror.rcac.purdue.edu/raspbian/ ${DEBIAN_VERSION} main" /etc/apt/sources.list || echo "deb http://plug-mirror.rcac.purdue.edu/raspbian/ ${DEBIAN_VERSION} main" >> /etc/apt/sources.list
grep -qxF "deb http://mirrors.ocf.berkeley.edu/raspbian/raspbian ${DEBIAN_VERSION} main" /etc/apt/sources.list || echo "deb http://mirrors.ocf.berkeley.edu/raspbian/raspbian ${DEBIAN_VERSION} main" >> /etc/apt/sources.list
grep -qxF "deb http://mirror.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian ${DEBIAN_VERSION} main" /etc/apt/sources.list || echo "deb http://mirror.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian ${DEBIAN_VERSION} main" >> /etc/apt/sources.list
grep -qxF "deb http://mirror.netcologne.de/raspbian/raspbian/ ${DEBIAN_VERSION} main" /etc/apt/sources.list || echo "deb http://mirror.netcologne.de/raspbian/raspbian/ ${DEBIAN_VERSION} main" >> /etc/apt/sources.list
if [ $IS_RASPI = 1 ]; then
grep -qxF "deb http://plug-mirror.rcac.purdue.edu/raspbian/ ${DEBIAN_VERSION} main" /etc/apt/sources.list || echo "deb http://plug-mirror.rcac.purdue.edu/raspbian/ ${DEBIAN_VERSION} main" >> /etc/apt/sources.list
grep -qxF "deb http://mirrors.ocf.berkeley.edu/raspbian/raspbian ${DEBIAN_VERSION} main" /etc/apt/sources.list || echo "deb http://mirrors.ocf.berkeley.edu/raspbian/raspbian ${DEBIAN_VERSION} main" >> /etc/apt/sources.list
fi
# Import Keys
curl https://keybase.io/roasbeef/pgp_keys.asc | gpg --import
@ -657,6 +656,7 @@ fi
# Setup myNode Startup Script
systemctl daemon-reload
systemctl enable docker
systemctl enable mynode
systemctl enable quicksync
systemctl enable torrent_check