So wrong

There have to be much better ways to do this :)

netstat –numeric-ports -lp | grep :80 | awk -F” ” ‘{print $7}’ | awk -F\/ ‘{print $2}’ | sudo xargs killall -9 && sudo /etc/init.d/apache2 start

About Nathan Powell

I am a middle aged technologist freak-ball.
This entry was posted in computers. Bookmark the permalink.

7 Responses to So wrong

  1. wow, I missed something. When’d you switch over to wordpress? This is a great theme. Been missing you in #cplug.

  2. eric says:

    Yeah, I’ve been missing you in #cplug too. And #hpm is depleted by 1/3 :-)

    For the above, how about:

    perl -e ‘”/etc/init.d/apache start” if not `/etc/init.d/apache status –quiet`”

    Or the bash equivalant, whatever that is :-)
    -Eric

  3. fuzzie says:

    Miss you at #cplug.
    Want a futon?

  4. Nunya Business says:

    What’s #cplug? A channel for ranting and raving lunatics?

  5. Hello all. Thanks.

    Josiah, I switched a short time ago. It works pretty well I must say.

    Eric, yeah the story behind that one liner is long and varied, it started with needing to sniff a port and then killing that PID…after that start apache, wheather it was apache you killed or not. So I came up with that. :)

    Fuzzie, no.

  6. I’m glad you like WP. Now we have to get Eric to switch.