changes in sh file so that it'll detect existing server instance

current implementation let us start two server instances and throws errors during the process.
this change help to identify existing server instance and stop the another instance from starting