Skip to content

Instantly share code, notes, and snippets.

@CLCL
Created January 21, 2015 13:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CLCL/0b1653b8bae3aef9b236 to your computer and use it in GitHub Desktop.
Save CLCL/0b1653b8bae3aef9b236 to your computer and use it in GitHub Desktop.
親プロセスのhttpdがいなくなった時、/sbin/service httpd stopでhttpdが死なないので、httpdがオーファンプロセスしかいないことを確認して、強制killする
if [ `ps jax |\grep http[d]| sort -r -n -k1 | awk '{print $1}' | uniq | head -1` == 1 ] ; then killall -9 httpd ; fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment