Automatically restart server when opening shell