From dc3ea28bf5b1bbd283db42049c93ff048afe9371 Mon Sep 17 00:00:00 2001 From: jerry048 Date: Wed, 2 Feb 2022 02:49:05 +0800 Subject: [PATCH] Update BBR.sh --- Miscellaneous/BBR/BBR.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Miscellaneous/BBR/BBR.sh b/Miscellaneous/BBR/BBR.sh index 9641b48..18e5df5 100644 --- a/Miscellaneous/BBR/BBR.sh +++ b/Miscellaneous/BBR/BBR.sh @@ -6,8 +6,14 @@ cd $HOME ## This part of the script is modified from https://github.com/KozakaiAya/TCP_BBR apt-get -qqy install dkms apt-get -qqy install linux-headers-$(uname -r) -wget https://raw.githubusercontent.com/jerry048/Seedbox-Components/main/Miscellaneous/BBR/5.10.0/tcp_bbrx.c -kernel_ver=5.10.0 +distro_codename="$(source /etc/os-release && printf "%s" "${VERSION_CODENAME}")" +if [[ $distro_codename = buster ]]; then + 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 + wget https://raw.githubusercontent.com/jerry048/Seedbox-Components/main/Miscellaneous/BBR/5.15.0/tcp_bbrx.c + kernel_ver=5.15.0 +fi algo=bbrx bbr_file=tcp_$algo bbr_src=$bbr_file.c