mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
Add failure check to execute sysctl
This commit is contained in:
parent
0e31670d25
commit
8f033e5920
@ -826,12 +826,12 @@ function _configure_tcp_bbr() {
|
|||||||
fi
|
fi
|
||||||
# Apply the sysctl changes
|
# Apply the sysctl changes
|
||||||
echo "Applying changes"
|
echo "Applying changes"
|
||||||
sudo sysctl -p
|
sudo sysctl -p || _install_status 1 "Unable to execute sysctl"
|
||||||
|
|
||||||
# Verify if BBR is enabled
|
# Verify if BBR is enabled
|
||||||
current_cc=$(sysctl net.ipv4.tcp_congestion_control | awk '{print $3}')
|
cc=$(sysctl net.ipv4.tcp_congestion_control | awk '{print $3}')
|
||||||
if [ "$current_cc" == "bbr" ]; then
|
if [ "$cc" == "bbr" ]; then
|
||||||
echo "TCP BBR has been successfully enabled"
|
echo "TCP BBR successfully enabled"
|
||||||
else
|
else
|
||||||
_install_status 1 "Failed to enable TCP BBR"
|
_install_status 1 "Failed to enable TCP BBR"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user