Browse Source

update proxy site to other sites

bugfixes
harshadyeola 10 years ago
parent
commit
d3e0b3fb7b
  1. 22
      ee/cli/plugins/site.py
  2. 3
      ee/cli/plugins/site_functions.py
  3. 2
      ee/cli/templates/siteinfo.mustache

22
ee/cli/plugins/site.py

@ -144,6 +144,10 @@ class EESiteController(CementBaseController):
ee_db_host = siteinfo.db_host
if sitetype != "html":
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")
@ -730,14 +734,21 @@ class EESiteUpdateController(CementBaseController):
Log.info(self, "Password Unchanged.")
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:
Log.info(self, Log.FAIL + "Can not update HTML site to HHVM")
return 1
if ((stype == 'php' and oldsitetype != 'html') or
(stype == 'mysql' and oldsitetype not in ['html', 'php']) or
if ((stype == 'php' and oldsitetype not in ['html', 'proxy']) or
(stype == 'mysql' and oldsitetype not in ['html', 'php',
'proxy']) or
(stype == 'wp' and oldsitetype not in ['html', 'php', 'mysql',
'wp']) or
'proxy', 'wp']) or
(stype == 'wpsubdir' and oldsitetype in ['wpsubdomain']) or
(stype == 'wpsubdomain' and oldsitetype in ['wpsubdir']) or
(stype == oldsitetype and cache == oldcachetype) and
@ -781,8 +792,7 @@ class EESiteUpdateController(CementBaseController):
stype = oldsitetype
cache = oldcachetype
if oldsitetype == 'html':
if oldsitetype == 'html' or oldsitetype == 'proxy':
data['static'] = True
data['wp'] = False
data['multisite'] = False
@ -962,7 +972,7 @@ class EESiteUpdateController(CementBaseController):
return 1
# 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:
ee_wp_creds = setupwordpress(self, data)
except SiteError as e:

3
ee/cli/plugins/site_functions.py

@ -555,7 +555,8 @@ def site_package_check(self, stype):
packages = []
stack = EEStackController()
stack.app = self.app
if stype in ['html', 'php', 'mysql', 'wp', 'wpsubdir', 'wpsubdomain']:
if stype in ['html', 'proxy', 'php', 'mysql', 'wp', 'wpsubdir',
'wpsubdomain']:
Log.debug(self, "Setting apt_packages variable for Nginx")
if EEVariables.ee_platform_distro == 'debian':

2
ee/cli/templates/siteinfo.mustache

@ -5,7 +5,7 @@ Nginx configuration {{type}} {{enable}}
{{#hhvm}}HHVM {{hhvm}}{{/hhvm}}
access_log {{accesslog}}
error_log {{errorlog}}
Webroot {{webroot}}
{{#webroot}}Webroot {{webroot}}{{/webroot}}
{{#dbname}}DB_NAME {{dbname}}{{/dbname}}
{{#dbname}}DB_USER {{dbuser}}{{/dbname}}
{{#dbname}}DB_PASS {{dbpass}}{{/dbname}}

Loading…
Cancel
Save