Skip to content

Instantly share code, notes, and snippets.

@rushipkar90
Created September 25, 2015 16:28
Show Gist options
  • Save rushipkar90/f212c47385e9487ac809 to your computer and use it in GitHub Desktop.
Save rushipkar90/f212c47385e9487ac809 to your computer and use it in GitHub Desktop.
disable_httpd_coredumps.sh
#!/bin/bash
if grep -Fxq "ulimit -c 0" /etc/init.d/httpd
then
exit 0
else
sed -i '/ulimit -n 16384/a ulimit -c 0' /etc/init.d/httpd
/etc/init.d/httpd stop
sleep 10
/etc/init.d/httpd start
exit 0
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment