'Prepare the authenticator/installer.
:raises .errors.NoInstallationError: If Nginx ctl cannot be found
:raises .errors.MisconfigurationError: If Nginx is misconfigured'

def prepare(self):

    if (not util.exe_exists(self.conf('ctl'))):
        raise errors.NoInstallationError
    self.config_test()
    self.parser = parser.NginxParser(self.conf('server-root'))
    install_ssl_options_conf(self.mod_ssl_conf, self.updated_mod_ssl_conf_digest)
    if (self.version is None):
        self.version = self.get_version()
    try:
        util.lock_dir_until_exit(self.conf('server-root'))
    except (OSError, errors.LockError):
        logger.debug('Encountered    error:', exc_info=True)
        raise errors.PluginError('Unable    to    lock    %s', self.conf('server-root'))
