def postConfigure(self): if self.cisTrue("ldif_create"): self.createLdifs() if self.cisTrue("ldif_install"): self.addLdifs() msg = "Don't forget to add index on the alias attribute (DN of user certificate used when this DN is incompatible with the LDAP tree)\n" msg += "In your actual configuration, this attribute is: " + self.cget("attribute_alias") + "\n" msg += "See the INSTALL file" utils.putWarning(msg)
def postUnpack(self): if self.cisTrue("multi_dseta_architecture"): webxml_path = CONFIG.get("tomcat", "catalina_home") + "webapps/" + self.cget("name") + "/WEB-INF/web.xml" cmd = """sed -i ' /<\/web-app>/i\\ <listener>\\ <listener-class>fr.unicaen.iota.dseta.service.PublisherContextListener</listener-class>\\ </listener>' %s""" % webxml_path if not utils.sh_exec(cmd): utils.putWarning("The Publisher listener could not be added to web.xml")
def postConfigure(self): if self.cget("create_file"): zone = self.cget("vendor_prefix") + "." + self.cget("domain_prefix") email = self.cget("email") date = datetime.date.today() serial = "%04d%02d%02d00" % (date.year, date.month, date.day) server = self.cget("server") comurl = self.cget("home_page") dsurl = CONFIG.get("ds", "url") dsetaurl = CONFIG.get("dseta", "url") + "ided_ds/" utils.writeFile("Creating ONS zone template", self.cget("filename"), """ ;; $TTL 1d ;; zone $ORIGIN %s @ IN SOA localhost %s ( %s ; serial 3h ; refresh 1h ; retry 1d ; expire 1h ; cache ) ;; this server is the nameserver for this zone ; IN NS %s. ; NAPTRs for products ;; example product ;; order pref flags service regex replacement ;2.1.0.9.8 IN NAPTR 0 0 "u" "epc+html" "!^.*$!%s!" . ; IN NAPTR 1 0 "u" "epc+ds" "!^.*$!%s!" . ; IN NAPTR 2 0 "u" "epc+ided_ds" "!^.*$!%s!" . """ % (zone, email, serial, server, comurl, dsurl, dsetaurl)) utils.putWarning("This is just a template. You need to complete it with products ids.")