|
@ -144,6 +144,10 @@ class EESiteController(CementBaseController): |
|
|
ee_db_host = siteinfo.db_host |
|
|
ee_db_host = siteinfo.db_host |
|
|
if sitetype != "html": |
|
|
if sitetype != "html": |
|
|
hhvm = ("enabled" if siteinfo.is_hhvm else "disabled") |
|
|
hhvm = ("enabled" if siteinfo.is_hhvm else "disabled") |
|
|
|
|
|
if sitetype == "proxy": |
|
|
|
|
|
access_log = "/var/log/nginx/{0}.access.log".format(ee_domain) |
|
|
|
|
|
error_log = "/var/log/nginx/{0}.error.log".format(ee_domain) |
|
|
|
|
|
ee_site_webroot = '' |
|
|
|
|
|
|
|
|
pagespeed = ("enabled" if siteinfo.is_pagespeed else "disabled") |
|
|
pagespeed = ("enabled" if siteinfo.is_pagespeed else "disabled") |
|
|
|
|
|
|
|
@ -730,14 +734,21 @@ class EESiteUpdateController(CementBaseController): |
|
|
Log.info(self, "Password Unchanged.") |
|
|
Log.info(self, "Password Unchanged.") |
|
|
return 0 |
|
|
return 0 |
|
|
|
|
|
|
|
|
|
|
|
if ((stype == "proxy" and stype == oldsitetype and self.app.pargs.hhvm) |
|
|
|
|
|
or (stype == "proxy" and |
|
|
|
|
|
stype == oldsitetype and self.app.pargs.pagespeed)): |
|
|
|
|
|
Log.info(self, Log.FAIL + |
|
|
|
|
|
"Can not update proxy site to HHVM or Pagespeed") |
|
|
|
|
|
return 1 |
|
|
if stype == "html" and stype == oldsitetype and self.app.pargs.hhvm: |
|
|
if stype == "html" and stype == oldsitetype and self.app.pargs.hhvm: |
|
|
Log.info(self, Log.FAIL + "Can not update HTML site to HHVM") |
|
|
Log.info(self, Log.FAIL + "Can not update HTML site to HHVM") |
|
|
return 1 |
|
|
return 1 |
|
|
|
|
|
|
|
|
if ((stype == 'php' and oldsitetype != 'html') or |
|
|
if ((stype == 'php' and oldsitetype not in ['html', 'proxy']) or |
|
|
(stype == 'mysql' and oldsitetype not in ['html', 'php']) or |
|
|
(stype == 'mysql' and oldsitetype not in ['html', 'php', |
|
|
|
|
|
'proxy']) or |
|
|
(stype == 'wp' and oldsitetype not in ['html', 'php', 'mysql', |
|
|
(stype == 'wp' and oldsitetype not in ['html', 'php', 'mysql', |
|
|
'wp']) or |
|
|
'proxy', 'wp']) or |
|
|
(stype == 'wpsubdir' and oldsitetype in ['wpsubdomain']) or |
|
|
(stype == 'wpsubdir' and oldsitetype in ['wpsubdomain']) or |
|
|
(stype == 'wpsubdomain' and oldsitetype in ['wpsubdir']) or |
|
|
(stype == 'wpsubdomain' and oldsitetype in ['wpsubdir']) or |
|
|
(stype == oldsitetype and cache == oldcachetype) and |
|
|
(stype == oldsitetype and cache == oldcachetype) and |
|
@ -781,8 +792,7 @@ class EESiteUpdateController(CementBaseController): |
|
|
|
|
|
|
|
|
stype = oldsitetype |
|
|
stype = oldsitetype |
|
|
cache = oldcachetype |
|
|
cache = oldcachetype |
|
|
|
|
|
if oldsitetype == 'html' or oldsitetype == 'proxy': |
|
|
if oldsitetype == 'html': |
|
|
|
|
|
data['static'] = True |
|
|
data['static'] = True |
|
|
data['wp'] = False |
|
|
data['wp'] = False |
|
|
data['multisite'] = False |
|
|
data['multisite'] = False |
|
@ -962,7 +972,7 @@ class EESiteUpdateController(CementBaseController): |
|
|
return 1 |
|
|
return 1 |
|
|
|
|
|
|
|
|
# Setup WordPress if old sites are html/php/mysql sites |
|
|
# Setup WordPress if old sites are html/php/mysql sites |
|
|
if data['wp'] and oldsitetype in ['html', 'php', 'mysql']: |
|
|
if data['wp'] and oldsitetype in ['html', 'proxy', 'php', 'mysql']: |
|
|
try: |
|
|
try: |
|
|
ee_wp_creds = setupwordpress(self, data) |
|
|
ee_wp_creds = setupwordpress(self, data) |
|
|
except SiteError as e: |
|
|
except SiteError as e: |
|
|