Add service/daemon support in core