Created
March 20, 2012 04:10
-
-
Save minghan/2131241 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/sh | |
rmiregistry & | |
java EventManager & | |
echo "Started EM" | |
clean_up() | |
{ | |
pkill rmiregistry | |
ps -ef | grep "\bjava EventManager" | awk '{print $2}' | xargs kill -9 | |
echo "\nTerminated rmiregistry, EventManager" | |
exit | |
} | |
trap clean_up 1 2 #SIGHUP, SIGINT | |
while : | |
do | |
sleep 1000 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment