mirror of
https://github.com/deadcxap/init_scripts.git
synced 2026-07-02 05:43:40 +03:00
feat: add sysctl tuning
This commit is contained in:
@@ -252,6 +252,21 @@ configure_logrotate() {
|
|||||||
EOF"
|
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() {
|
install_netbird() {
|
||||||
[[ -z "$NETBIRD_KEY" ]] && return
|
[[ -z "$NETBIRD_KEY" ]] && return
|
||||||
run "Waiting for apt lock" wait_for_apt
|
run "Waiting for apt lock" wait_for_apt
|
||||||
@@ -350,6 +365,7 @@ setup_role() {
|
|||||||
|
|
||||||
main() {
|
main() {
|
||||||
install_packages
|
install_packages
|
||||||
|
configure_sysctl
|
||||||
setup_timezone
|
setup_timezone
|
||||||
create_user
|
create_user
|
||||||
configure_ssh
|
configure_ssh
|
||||||
|
|||||||
Reference in New Issue
Block a user