Use a function for getting Deadwood process IDs
This makes the stop/restart section a lot neater