forked from Interanet/server-bootstrap
initial commit
This commit is contained in:
30
scripts/mirrors/os/runflare/debian.sh
Normal file
30
scripts/mirrors/os/runflare/debian.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
echo "================================="
|
||||
echo " Runflare Debian Mirror Setup"
|
||||
echo "================================="
|
||||
|
||||
source /etc/os-release
|
||||
|
||||
if [[ "$ID" != "debian" ]]; then
|
||||
echo "This script only supports Debian."
|
||||
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/debian $CODENAME main
|
||||
deb http://mirror-linux.runflare.com/debian-security ${CODENAME}-security main
|
||||
EOF
|
||||
|
||||
echo "[3/3] Updating package index..."
|
||||
apt update
|
||||
|
||||
echo "Debian mirror configured."
|
||||
Reference in New Issue
Block a user