Supporting Debian 11

This commit is contained in:
jerry048 2022-02-02 03:15:24 +08:00
parent 6571fc796d
commit 36f1ef61d0
2 changed files with 10 additions and 9 deletions

View File

@ -8,17 +8,9 @@ apt-get -qqy install dkms
apt-get -qqy install linux-headers-$(uname -r) apt-get -qqy install linux-headers-$(uname -r)
distro_codename="$(source /etc/os-release && printf "%s" "${VERSION_CODENAME}")" distro_codename="$(source /etc/os-release && printf "%s" "${VERSION_CODENAME}")"
if [[ $distro_codename = buster ]]; then 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 wget https://raw.githubusercontent.com/jerry048/Seedbox-Components/main/Miscellaneous/BBR/5.10.0/tcp_bbrx.c
kernel_ver=5.10.0 kernel_ver=5.10.0
else if [[ $distro_codename = bullseye ]] ; then 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 wget https://raw.githubusercontent.com/jerry048/Seedbox-Components/main/Miscellaneous/BBR/5.15.0/tcp_bbrx.c
kernel_ver=5.15.0 kernel_ver=5.15.0
fi fi

View File

@ -464,8 +464,17 @@ EOF
## BBR ## BBR
function Tweaked_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 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 cat << EOF > /etc/systemd/system/bbrinstall.service
[Unit] [Unit]
Description=BBRinstall Description=BBRinstall