From c1dc18360f715735b971d3d13191a9858004429d Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Sat, 12 Oct 2019 11:09:35 +0200 Subject: [PATCH] Fix www added to subdomain --- install | 4 +++ wo/cli/plugins/site_functions.py | 54 +++++++++++++++++--------------- 2 files changed, 32 insertions(+), 26 deletions(-) diff --git a/install b/install index 0363f1a..ff1b5c1 100755 --- a/install +++ b/install @@ -62,6 +62,10 @@ while [ "$#" -gt 0 ]; do wo_branch="$2" shift ;; + -v | --version) + wo_version="$2" + shift + ;; --force) wo_force_install="y" ;; diff --git a/wo/cli/plugins/site_functions.py b/wo/cli/plugins/site_functions.py index e9b0454..a14f911 100644 --- a/wo/cli/plugins/site_functions.py +++ b/wo/cli/plugins/site_functions.py @@ -462,19 +462,20 @@ def setupwordpress(self, data, vhostonly=False): Log.debug(self, "{0} --allow-root core install " .format(WOVar.wo_wpcli_path) + "--url=\'{0}\' --title=\'{0}\' --admin_name=\'{1}\' " - .format(data['www_domain'], wo_wp_user) + + .format(data['site_name'], wo_wp_user) + "--admin_password= --admin_email=\'{1}\'" - .format(wo_wp_pass, wo_wp_email)) + .format(wo_wp_email)) try: - if WOShellExec.cmd_exec(self, "{0} --allow-root core " - .format(WOVar.wo_wpcli_path) + - "install --url=\'{0}\' --title=\'{0}\' " - "--admin_name=\'{1}\' " - .format(data['www_domain'], wo_wp_user) + - "--admin_password=\'{0}\' " - "--admin_email=\'{1}\'" - .format(wo_wp_pass, wo_wp_email), - log=False): + if WOShellExec.cmd_exec( + self, "{0} --allow-root core " + .format(WOVar.wo_wpcli_path) + + "install --url=\'{0}\' --title=\'{0}\' " + "--admin_name=\'{1}\' " + .format(data['site_name'], wo_wp_user) + + "--admin_password=\'{0}\' " + "--admin_email=\'{1}\'" + .format(wo_wp_pass, wo_wp_email), + log=False): pass else: raise SiteError( @@ -487,26 +488,27 @@ def setupwordpress(self, data, vhostonly=False): .format(WOVar.wo_wpcli_path) + "core multisite-install " "--url=\'{0}\' --title=\'{0}\' --admin_name=\'{1}\' " - .format(data['www_domain'], wo_wp_user) + + .format(data['site_name'], wo_wp_user) + "--admin_password= --admin_email=\'{1}\' " "{subdomains}" - .format(wo_wp_pass, wo_wp_email, + .format(wo_wp_email, subdomains='--subdomains' if not data['wpsubdir'] else '')) try: - if WOShellExec.cmd_exec(self, "{0} --allow-root " - .format(WOVar.wo_wpcli_path) + - "core multisite-install " - "--url=\'{0}\' --title=\'{0}\' " - "--admin_name=\'{1}\' " - .format(data['www_domain'], wo_wp_user) + - "--admin_password=\'{0}\' " - "--admin_email=\'{1}\' " - "{subdomains}" - .format(wo_wp_pass, wo_wp_email, - subdomains='--subdomains' - if not data['wpsubdir'] else ''), - log=False): + if WOShellExec.cmd_exec( + self, "{0} --allow-root " + .format(WOVar.wo_wpcli_path) + + "core multisite-install " + "--url=\'{0}\' --title=\'{0}\' " + "--admin_name=\'{1}\' " + .format(data['site_name'], wo_wp_user) + + "--admin_password=\'{0}\' " + "--admin_email=\'{1}\' " + "{subdomains}" + .format(wo_wp_pass, wo_wp_email, + subdomains='--subdomains' + if not data['wpsubdir'] else ''), + log=False): pass else: raise SiteError(