Return True if the named service is enabled, false otherwise
    A service is considered enabled if in your service directory:
    - an executable ./run file exist
    - a file named "down" does not exist

    .. versionadded:: 2015.5.7

    name
        Service name

    CLI Example:

    .. code-block:: bash

        salt '*' daemontools.enabled <service name>

def enabled(name, **kwargs):
    '''
    Return True if the named service is enabled, false otherwise
    A service is considered enabled if in your service directory:
    - an executable ./run file exist
    - a file named "down" does not exist

    .. versionadded:: 2015.5.7

    name
        Service name

    CLI Example:

    .. code-block:: bash

        salt '*' daemontools.enabled <service name>
    '''
    if not available(name):
        log.error('Service %s not found', name)
        return False

    run_file = os.path.join(SERVICE_DIR, name, 'run')
    down_file = os.path.join(SERVICE_DIR, name, 'down')

    return (
        os.path.isfile(run_file) and
        os.access(run_file, os.X_OK) and not
        os.path.isfile(down_file)
    )