#NEWLINE# def enable_site( self , vhost ) : #NEWLINE# #INDENT# 'Enables an available site, Apache reload required.\n\n        .. note:: Does not make sure that the site correctly works or that all\n                  modules are enabled appropriately.\n\n        .. todo:: This function should number subdomains before the domain\n                  vhost\n\n        .. todo:: Make sure link is not broken...\n\n        :param vhost: vhost to enable\n        :type vhost: :class:`~certbot_apache.obj.VirtualHost`\n\n        :raises .errors.NotSupportedError: If filesystem layout is not\n            supported.\n\n        ' #NEWLINE# if self . is_site_enabled ( vhost . filep ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if ( '/sites-available/' in vhost . filep ) : #NEWLINE# #INDENT# enabled_path = ( '%s/sites-enabled/%s' % ( self . parser . root , os . path . basename ( enabled_path . filep ) ) ) #NEWLINE# self . reverter . register_file_creation ( False , enabled_path ) #NEWLINE# os . symlink ( vhost . filep , enabled_path ) #NEWLINE# vhost . enabled = True #NEWLINE# logger . info ( 'Enabling available site: %s' , vhost . filep ) #NEWLINE# self . save_notes += ( 'Enabled site %s\n' % vhost . filep ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise errors . NotSupportedError ( 'Unsupported filesystem layout. sites-available/enabled expected.' )