initial commit
This commit is contained in:
32
scripts/mirrors/os/runflare/ubuntu.sh
Normal file
32
scripts/mirrors/os/runflare/ubuntu.sh
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
echo "================================="
|
||||
echo " Runflare Ubuntu Mirror Setup"
|
||||
echo "================================="
|
||||
|
||||
source /etc/os-release
|
||||
|
||||
if [[ "$ID" != "ubuntu" ]]; then
|
||||
echo "This script only supports Ubuntu."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CODENAME=$(lsb_release -cs)
|
||||
|
||||
echo "[1/3] Backing up sources.list..."
|
||||
cp /etc/apt/sources.list /etc/apt/sources.list.bak
|
||||
|
||||
echo "[2/3] Writing Runflare mirror..."
|
||||
|
||||
tee /etc/apt/sources.list > /dev/null <<EOF
|
||||
deb http://mirror-linux.runflare.com/ubuntu $CODENAME main restricted universe multiverse
|
||||
deb http://mirror-linux.runflare.com/ubuntu $CODENAME-updates main restricted universe multiverse
|
||||
deb http://mirror-linux.runflare.com/ubuntu $CODENAME-backports main restricted universe multiverse
|
||||
deb http://mirror-linux.runflare.com/ubuntu $CODENAME-security main restricted universe multiverse
|
||||
EOF
|
||||
|
||||
echo "[3/3] Updating package index..."
|
||||
apt update
|
||||
|
||||
echo "Ubuntu mirror configured."
|
||||
Reference in New Issue
Block a user