updated the script to know if the server is running