Check if process is running by name.

def get_pid(name):
    """Check if process is running by name."""
    if not shutil.which("pidof"):
        return False

    try:
        subprocess.check_output(["pidof", "-s", name])
    except subprocess.CalledProcessError:
        return False

    return True