Updated dev restart script to store pid, updated to work with external apps