Created
February 21, 2014 07:23
-
-
Save reggi/9130144 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "The following node processes were found:" | |
ps aux | grep " node " | grep -v grep | |
nodepids=$(ps aux | grep " node " | grep -v grep | cut -c10-15) | |
echo "OK, so we will stop these process/es now..." | |
for nodepid in ${nodepids[@]} | |
do | |
echo "Stopping PID :"$nodepid | |
kill -9 $nodepid | |
done | |
echo "Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment