def do(self, args=[]): completed = SiteCreateCommand.do(self,args) if not completed: if not self.ask_create_name(self.get_next_arg(args)): #self.ask_alias_name() self.ask_dev_name() self.update_client_info() self.ask_create_access() self.ask_create_mysql(mandatory=True) self.ask_allow_override(default='All') self.conf.mod('php','enabled', True) self.conf.mod('php','php_engine','on') mysql_enabled = self.conf.get('mysql','schema') is not None self.conf.mod('mysql','enabled', mysql_enabled) self.conf.mod('wordpress','enabled', True) self.conf.mod('wikimedia','enabled', False) self.conf.mod('typo3','enabled', False) self.save() self.fix_config(overwrite=True) try: if inputs.get_input_yesno(t("Do you want to send configuration of %(name)s to %(mail)s?") % { 'name': self.conf.get('main','site_name'), 'mail': CONF_MAP('mail','admin_mail'), }): self.send_status_mail() except Exception: L.exception(t("Problem sending mail in %s") % __file__) print self.gen_status_msg() completed = True return completed
def __init__(self): SiteCreateCommand.__init__(self)