Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
if grep -q 32768 /etc/security/limits.conf; then
sudo sed -i -e "/^.*nofile 32768$/d" /etc/security/limits.conf
sudo sed -i -e "/^.*nofile 65536$/d" /etc/security/limits.conf
else
echo skip /etc/security/limits.conf;
fi
if grep -q net.core.somaxconn /etc/sysctl.conf; then
sudo sed -i -e "/^net.core.somaxconn.*$/d" /etc/sysctl.conf
else
echo skip /etc/sysctl.conf;
fi
echo "reload settings";
sudo sysctl -p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment