If run-class.sh is invoked with restart or start twice in quick succession, two servers can end up running at the same time.
This is because there is no special locking, and the .pid file isn't written until the script sleeps for 2 seconds after starting.
There should probably be file locking added.