switch to pid for stopping and starting server