Skip to content

Instantly share code, notes, and snippets.

@minghan
Created March 20, 2012 04:10
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 minghan/2131241 to your computer and use it in GitHub Desktop.
Save minghan/2131241 to your computer and use it in GitHub Desktop.
#!/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