add vhostonly option
This commit is contained in:
@@ -404,12 +404,14 @@ class WOSiteCreateController(CementBaseController):
|
|||||||
"{0} already exists".format(wo_domain))
|
"{0} already exists".format(wo_domain))
|
||||||
|
|
||||||
if stype == 'proxy':
|
if stype == 'proxy':
|
||||||
data['site_name'] = wo_domain
|
data = dict(site_name=wo_domain, www_domain=wo_www_domain,
|
||||||
data['www_domain'] = wo_www_domain
|
static=True, basic=False, php73=False, wp=False,
|
||||||
|
wpfc=False, wpsc=False, multisite=False,
|
||||||
|
wpsubdir=False, webroot=wo_site_webroot)
|
||||||
data['proxy'] = True
|
data['proxy'] = True
|
||||||
data['host'] = host
|
data['host'] = host
|
||||||
data['port'] = port
|
data['port'] = port
|
||||||
wo_site_webroot = WOVariables.wo_webroot + wo_domain
|
data['basic'] = True
|
||||||
|
|
||||||
if self.app.pargs.php73:
|
if self.app.pargs.php73:
|
||||||
data = dict(site_name=wo_domain, www_domain=wo_www_domain,
|
data = dict(site_name=wo_domain, www_domain=wo_www_domain,
|
||||||
@@ -418,6 +420,9 @@ class WOSiteCreateController(CementBaseController):
|
|||||||
wpsubdir=False, webroot=wo_site_webroot)
|
wpsubdir=False, webroot=wo_site_webroot)
|
||||||
data['basic'] = True
|
data['basic'] = True
|
||||||
|
|
||||||
|
if self.app.pargs.vhostonly:
|
||||||
|
data['vhostonly'] = True
|
||||||
|
|
||||||
if stype in ['html', 'php']:
|
if stype in ['html', 'php']:
|
||||||
data = dict(site_name=wo_domain, www_domain=wo_www_domain,
|
data = dict(site_name=wo_domain, www_domain=wo_www_domain,
|
||||||
static=True, basic=False, php73=False, wp=False,
|
static=True, basic=False, php73=False, wp=False,
|
||||||
@@ -583,11 +588,12 @@ class WOSiteCreateController(CementBaseController):
|
|||||||
"and please try again")
|
"and please try again")
|
||||||
|
|
||||||
# Setup WordPress if Wordpress site
|
# Setup WordPress if Wordpress site
|
||||||
if data['wp']:
|
if (data['wp'] and (not data['vhostonly'])):
|
||||||
try:
|
try:
|
||||||
wo_wp_creds = setupwordpress(self, data)
|
wo_wp_creds = setupwordpress(self, data)
|
||||||
# Add database information for site into database
|
# Add database information for site into database
|
||||||
updateSiteInfo(self, wo_domain, db_name=data['wo_db_name'],
|
updateSiteInfo(self, wo_domain,
|
||||||
|
db_name=data['wo_db_name'],
|
||||||
db_user=data['wo_db_user'],
|
db_user=data['wo_db_user'],
|
||||||
db_password=data['wo_db_pass'],
|
db_password=data['wo_db_pass'],
|
||||||
db_host=data['wo_db_host'])
|
db_host=data['wo_db_host'])
|
||||||
|
|||||||
@@ -49,8 +49,7 @@ def pre_run_checks(self):
|
|||||||
def check_domain_exists(self, domain):
|
def check_domain_exists(self, domain):
|
||||||
if getSiteInfo(self, domain):
|
if getSiteInfo(self, domain):
|
||||||
return True
|
return True
|
||||||
else:
|
return False
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
def setupdomain(self, data):
|
def setupdomain(self, data):
|
||||||
@@ -1202,9 +1201,8 @@ def deleteWebRoot(self, webroot):
|
|||||||
Log.debug(self, "Removing {0}".format(webroot))
|
Log.debug(self, "Removing {0}".format(webroot))
|
||||||
WOFileUtils.rm(self, webroot)
|
WOFileUtils.rm(self, webroot)
|
||||||
return True
|
return True
|
||||||
else:
|
Log.debug(self, "{0} does not exist".format(webroot))
|
||||||
Log.debug(self, "{0} does not exist".format(webroot))
|
return False
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
def removeNginxConf(self, domain):
|
def removeNginxConf(self, domain):
|
||||||
|
|||||||
Reference in New Issue
Block a user