Skip to content

Instantly share code, notes, and snippets.

View dimoroz772's full-sized avatar
๐Ÿ˜ˆ
Forever red eyes

Dmitriy dimoroz772

๐Ÿ˜ˆ
Forever red eyes
View GitHub Profile
@rsyuzyov
rsyuzyov / foreman-setup.sh
Last active November 15, 2025 08:14
foreman setup
#!/bin/bash
set -e
grep -qxF "net.ipv6.conf.all.disable_ipv6 = 1" /etc/sysctl.conf || echo "net.ipv6.conf.all.disable_ipv6 = 1" | tee -a /etc/sysctl.conf
grep -qxF "net.ipv6.conf.default.disable_ipv6 = 1" /etc/sysctl.conf || echo "net.ipv6.conf.default.disable_ipv6 = 1" | tee -a /etc/sysctl.conf
grep -qxF "net.ipv6.conf.lo.disable_ipv6 = 1" /etc/sysctl.conf || echo "net.ipv6.conf.lo.disable_ipv6 = 1" | tee -a /etc/sysctl.conf
grep -qxF "127.0.0.1 $(hostname โˆ’f) $(hostname โˆ’s)" /etc/hosts || sed โˆ’i "127.0.0.1 $(hostname -f) $(hostname โˆ’s)" /etc/hosts
apt update && apt dist-upgrade -y