Skip to content

Commit

Permalink
Add failure check to execute sysctl
Browse files Browse the repository at this point in the history
  • Loading branch information
billz committed Aug 17, 2024
1 parent 0e31670 commit 8f033e5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions installers/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -826,12 +826,12 @@ function _configure_tcp_bbr() {
fi
# Apply the sysctl changes
echo "Applying changes"
sudo sysctl -p
sudo sysctl -p || _install_status 1 "Unable to execute sysctl"

# Verify if BBR is enabled
current_cc=$(sysctl net.ipv4.tcp_congestion_control | awk '{print $3}')
if [ "$current_cc" == "bbr" ]; then
echo "TCP BBR has been successfully enabled"
cc=$(sysctl net.ipv4.tcp_congestion_control | awk '{print $3}')
if [ "$cc" == "bbr" ]; then
echo "TCP BBR successfully enabled"
else
_install_status 1 "Failed to enable TCP BBR"
fi
Expand Down

0 comments on commit 8f033e5

Please sign in to comment.