def check_site_enabled(site):
 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

def check_site_enabled ( site ) : 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
checks to see if the specific site symlink is in /etc/apache2/sites-enabled .