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