Checks to see if the specific site symlink is in /etc/apache2/sites-enabled.

    This will only be functional on Debian-based operating systems (Ubuntu,
    Mint, etc).

    CLI Examples:

    .. code-block:: bash

        salt '*' apache.check_site_enabled example.com
        salt '*' apache.check_site_enabled example.com.conf

def check_site_enabled(site):
    '''
    Checks to see if the specific site symlink is in /etc/apache2/sites-enabled.

    This will only be functional on Debian-based operating systems (Ubuntu,
    Mint, etc).

    CLI Examples:

    .. code-block:: bash

        salt '*' apache.check_site_enabled example.com
        salt '*' apache.check_site_enabled example.com.conf
    '''
    if site.endswith('.conf'):
        site_file = site
    else:
        site_file = '{0}.conf'.format(site)
    if os.path.islink('{0}/{1}'.format(SITE_ENABLED_DIR, site_file)):
        return True
    elif site == 'default' and \
            os.path.islink('{0}/000-{1}'.format(SITE_ENABLED_DIR, site_file)):
        return True
    else:
        return False