changing name for clarity

This commit is contained in:
David Edwards
2023-12-10 11:49:49 -07:00
parent f3177a8e4a
commit b1876c1935
4 changed files with 21 additions and 21 deletions

View File

@@ -159,13 +159,13 @@ _wo_complete()
"create")
COMPREPLY=( $(compgen \
-W "--user --pass --email --html --php --php72 --php73 --php74 --php80 --php81 --php82 --php83 --mysql --wp --wpsubdir --wpsubdomain --wpfc --wpsc --proxy= --alias --subsite --wpredis --wprocket --wpce -le --letsencrypt --letsencrypt=wildcard -le=wildcard --dns --dns=dns_cf --dns=dns_dgon" \
-W "--user --pass --email --html --php --php72 --php73 --php74 --php80 --php81 --php82 --php83 --mysql --wp --wpsubdir --wpsubdomain --wpfc --wpsc --proxy= --alias --subsiteof --wpredis --wprocket --wpce -le --letsencrypt --letsencrypt=wildcard -le=wildcard --dns --dns=dns_cf --dns=dns_dgon" \
-- $cur) )
;;
"update")
COMPREPLY=( $(compgen \
-W "--password --php --php72 --php73 --php74 --php80 --php81 --php82 --php83 --mysql --wp --wpsubdir --wpsubdomain --wpfc --wpsc --wpredis --wprocket --wpce --alias --subsite -le -le=off --letsencrypt --letsencrypt=off --letsencrypt=clean -le=wildcard -le=clean --dns --dns=dns_cf --dns=dns_dgon --ngxblocker --ngxblocker=off" \
-W "--password --php --php72 --php73 --php74 --php80 --php81 --php82 --php83 --mysql --wp --wpsubdir --wpsubdomain --wpfc --wpsc --wpredis --wprocket --wpce --alias --subsiteof -le -le=off --letsencrypt --letsencrypt=off --letsencrypt=clean -le=wildcard -le=clean --dns --dns=dns_cf --dns=dns_dgon --ngxblocker --ngxblocker=off" \
-- $cur) )
;;
"delete")

View File

@@ -64,8 +64,8 @@ class WOSiteCreateController(CementBaseController):
(['--alias'],
dict(help="domain name to redirect to",
action='store', nargs='?')),
(['--subsite'],
dict(help="parent multi-site name",
(['--subsiteof'],
dict(help="create a subsite of a multisite install",
action='store', nargs='?')),
(['-le', '--letsencrypt'],
dict(help="configure letsencrypt ssl for the site",
@@ -127,24 +127,24 @@ class WOSiteCreateController(CementBaseController):
proxyinfo = proxyinfo.split(':')
host = proxyinfo[0].strip()
port = '80' if len(proxyinfo) < 2 else proxyinfo[1].strip()
elif stype is None and not pargs.proxy and not pargs.alias and not pargs.subsite:
elif stype is None and not pargs.proxy and not pargs.alias and not pargs.subsiteofof:
stype, cache = 'html', 'basic'
elif stype is None and pargs.alias:
stype, cache = 'alias', ''
alias_name = pargs.alias.strip()
if not alias_name:
Log.error(self, "Please provide alias name")
elif stype is None and pargs.subsite:
elif stype is None and pargs.subsiteof:
stype, cache = 'subsite', ''
subsite_name = pargs.subsite.strip()
if not subsite_name:
subsiteof_name = pargs.subsiteof.strip()
if not subsiteof_name:
Log.error(self, "Please provide multisite parent name")
elif stype and pargs.proxy:
Log.error(self, "proxy should not be used with other site types")
elif stype and pargs.alias:
Log.error(self, "alias should not be used with other site types")
elif stype and pargs.subsite:
Log.error(self, "subsite should not be used with other site types")
elif stype and pargs.subsiteof:
Log.error(self, "subsiteof should not be used with other site types")
if not pargs.site_name:
try:
@@ -197,16 +197,16 @@ class WOSiteCreateController(CementBaseController):
if stype == 'subsite':
# Get parent site data
parent_site_info = getSiteInfo(self, subsite_name)
parent_site_info = getSiteInfo(self, subsiteof_name)
if not parent_site_info:
Log.error(self, "Parent site {0} does not exist"
.format(subsite_name))
.format(subsiteof_name))
if not parent_site_info.is_enabled:
Log.error(self, "Parent site {0} is not enabled"
.format(subsite_name))
if 'wp' not in parent_site_info.site_type:
Log.error(self, "Parent site {0} is not WordPress site"
.format(subsite_name))
.format(subsiteof_name))
if parent_site_info.site_type not in ['wpsubdomain', 'wpsubdir']:
Log.error(self, "Parent site {0} is not WordPress multisite"
.format(subsiteof_name))
data = dict(
site_name=wo_domain, www_domain=wo_www_domain,
@@ -221,8 +221,8 @@ class WOSiteCreateController(CementBaseController):
data["wpsubdir"] = parent_site_info.site_type == 'wpsubdir'
data["wo_php"] = ("php" + parent_site_info.php_version).replace(".", "")
data['subsite'] = True
data['subsite_name'] = subsite_name
data['subsite_webroot'] = parent_site_info.site_path
data['subsiteof_name'] = subsiteof_name
data['subsiteof_webroot'] = parent_site_info.site_path
if (pargs.php72 or pargs.php73 or pargs.php74 or
@@ -296,7 +296,7 @@ class WOSiteCreateController(CementBaseController):
(not pargs.wprocket) and
(not pargs.wpce) and
(not pargs.wpredis) and
(not pargs.subsite)):
(not pargs.subsiteof)):
data['basic'] = True
if (cache == 'wpredis'):

View File

@@ -68,7 +68,7 @@ def setupdomain(self, data):
wo_site_webroot = data['webroot']
if 'subsite' in data.keys() and data['subsite']:
wo_parent_site = data["subsite_name"]
wo_parent_site = data["subsiteof_name"]
wo_parent_info = getSiteInfo(wo_parent_site)
data["webroot"] = wo_parent_info["webroot"]

View File

@@ -51,7 +51,7 @@ server {
{{/subsite}}
{{#subsite}}
root {{subsite_webroot}}/htdocs;
root {{subsiteof_webroot}}/htdocs;
{{/subsite}}
index {{^static}}index.php{{/static}} index.html index.htm;