mirror of
https://github.com/deadcxap/init_scripts.git
synced 2026-07-02 05:43:40 +03:00
Merge pull request #13 from deadcxap/codex/add-function-to-setup.sh-for-sysctl-config
feat: add sysctl tuning
This commit is contained in:
@@ -252,6 +252,21 @@ configure_logrotate() {
|
||||
EOF"
|
||||
}
|
||||
|
||||
configure_sysctl() {
|
||||
run "Configuring sysctl parameters" bash -c "tee /etc/sysctl.d/90-vrbee.conf >/dev/null <<'EOF'
|
||||
net.core.default_qdisc = fq
|
||||
net.ipv4.tcp_congestion_control = bbr
|
||||
net.core.rmem_max = 16777216
|
||||
net.core.wmem_max = 16777216
|
||||
net.ipv4.tcp_rmem = 4096 87380 16777216
|
||||
net.ipv4.tcp_wmem = 4096 65536 16777216
|
||||
net.core.netdev_max_backlog = 16384
|
||||
net.ipv4.tcp_max_syn_backlog = 16384
|
||||
net.ipv4.ip_local_port_range = 10000 65535
|
||||
EOF"
|
||||
run "Applying sysctl parameters" bash -c "sysctl --system >/dev/null"
|
||||
}
|
||||
|
||||
install_netbird() {
|
||||
[[ -z "$NETBIRD_KEY" ]] && return
|
||||
run "Waiting for apt lock" wait_for_apt
|
||||
@@ -350,6 +365,7 @@ setup_role() {
|
||||
|
||||
main() {
|
||||
install_packages
|
||||
configure_sysctl
|
||||
setup_timezone
|
||||
create_user
|
||||
configure_ssh
|
||||
|
||||
Reference in New Issue
Block a user