From 36f1ef61d050906bc2b98c746de1d59fc08151b2 Mon Sep 17 00:00:00 2001 From: jerry048 Date: Wed, 2 Feb 2022 03:15:24 +0800 Subject: [PATCH] Supporting Debian 11 --- Miscellaneous/BBR/BBR.sh | 8 -------- tweaking.sh | 11 ++++++++++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Miscellaneous/BBR/BBR.sh b/Miscellaneous/BBR/BBR.sh index ff15c4d..18e5df5 100644 --- a/Miscellaneous/BBR/BBR.sh +++ b/Miscellaneous/BBR/BBR.sh @@ -8,17 +8,9 @@ apt-get -qqy install dkms apt-get -qqy install linux-headers-$(uname -r) distro_codename="$(source /etc/os-release && printf "%s" "${VERSION_CODENAME}")" if [[ $distro_codename = buster ]]; then - ## Update Kernel - normal_1; echo "Updating Kernel"; normal_2 - echo "deb http://deb.debian.org/debian buster-backports main" | sudo tee -a /etc/apt/sources.list - apt-get -qqy update && apt -qqyt buster-backports upgrade wget https://raw.githubusercontent.com/jerry048/Seedbox-Components/main/Miscellaneous/BBR/5.10.0/tcp_bbrx.c kernel_ver=5.10.0 else if [[ $distro_codename = bullseye ]] ; then - ## Update Kernel - normal_1; echo "Updating Kernel"; normal_2 - echo "deb http://deb.debian.org/debian bullseye-backports main" | sudo tee -a /etc/apt/sources.list - apt-get -qqy update && apt -qqyt bullseye-backports upgrade wget https://raw.githubusercontent.com/jerry048/Seedbox-Components/main/Miscellaneous/BBR/5.15.0/tcp_bbrx.c kernel_ver=5.15.0 fi diff --git a/tweaking.sh b/tweaking.sh index c957bd7..dac96f7 100644 --- a/tweaking.sh +++ b/tweaking.sh @@ -464,8 +464,17 @@ EOF ## BBR function Tweaked_BBR { - ## Install tweaked BBR automatically on reboot + ## Update Kernel + normal_1; echo "Updating Kernel"; normal_2 + if [[ $distro_codename = buster ]]; then + echo "deb http://deb.debian.org/debian buster-backports main" | sudo tee -a /etc/apt/sources.list + apt-get -qqy update && apt -qqyt buster-backports upgrade + else if [[ $distro_codename = bullseye ]] ; then + echo "deb http://deb.debian.org/debian bullseye-backports main" | sudo tee -a /etc/apt/sources.list + apt-get -qqy update && apt -qqyt bullseye-backports upgrade + fi wget https://raw.githubusercontent.com/jerry048/Seedbox-Components/main/Miscellaneous/BBR/BBR.sh && chmod +x BBR.sh + ## Install tweaked BBR automatically on reboot cat << EOF > /etc/systemd/system/bbrinstall.service [Unit] Description=BBRinstall