fixed restart script to check if already started