The added script uses the same logic as run.sh in order to sequentially kill and restart servers. Each server is killed (if a $server.pid file exists) and then the process is started. At this point the new pid is taken from the file and checked against the last pid found in the associated $server.log. When these two values are equal (i.e, the last time we've seen something like Starting server in PID ###. in the logs, and the value from $server.pid), we understand that to mean the server has successfully restarted.