def create_deamon(cmd, shell=False, root=False):
    """Usage:
        Create servcice process.
    """
    try:
        if root:
            cmd.insert(0, 'sudo')
        LOG.info(cmd)
        subproc = subprocess.Popen(cmd, shell=shell, stdout=subprocess.PIPE,
                                   stderr=subprocess.PIPE)
        return subproc.pid
    except Exception as e:
        LOG.error(e)
        raise