Add a new function 'maybe_daemonize'

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Add the network interface

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>