def install_sites(self, update): templ_sites = Template(filename=self.input) text = templ_sites.render(**self.options) config = Configuration(self.buildout, self.name + '.conf', { 'deployment': self.deployment_name, 'directory': os.path.join(self.options['etc-directory'], 'conf.d'), 'text': text}) return [config.install()]
def install_config(self, update): """ install nginx main config file """ text = templ_config.render(**self.options) config = Configuration(self.buildout, 'nginx.conf', { 'deployment': self.deployment_name, 'text': text}) # copy additional files try: copy2(os.path.join(os.path.dirname(__file__), "mime.types"), self.options['etc-directory']) except Exception: pass return [config.install()]