Browse Source

Fixed Nginx configuration bug

bugfixes
gau1991 10 years ago
parent
commit
0b28056222
  1. 22
      ee/cli/plugins/stack.py
  2. 1
      ee/core/aptget.py

22
ee/cli/plugins/stack.py

@ -141,7 +141,8 @@ class EEStackController(CementBaseController):
if set(EEVariables.ee_postfix).issubset(set(apt_packages)): if set(EEVariables.ee_postfix).issubset(set(apt_packages)):
pass pass
if set(EEVariables.ee_nginx).issubset(set(apt_packages)): if set(EEVariables.ee_nginx).issubset(set(apt_packages)):
# Nginx core configuration change using configparser if ((not os.path.isfile('/etc/nginx/conf.d/ee-nginx.conf')) and
os.path.isfile('/etc/nginx/nginx.conf')):
nc = NginxConfig() nc = NginxConfig()
self.app.log.debug('Loading file /etc/nginx/nginx.conf ') self.app.log.debug('Loading file /etc/nginx/nginx.conf ')
nc.loadf('/etc/nginx/nginx.conf') nc.loadf('/etc/nginx/nginx.conf')
@ -158,28 +159,29 @@ class EEStackController(CementBaseController):
# Custom Nginx configuration by EasyEngine # Custom Nginx configuration by EasyEngine
data = dict(version='EasyEngine 3.0.1') data = dict(version='EasyEngine 3.0.1')
self.app.log.debug('writting the nginx configration to file' self.app.log.debug('writting the nginx configration to '
'/etc/nginx/conf.d/ee-nginx.conf ') 'file /etc/nginx/conf.d/ee-nginx.conf ')
ee_nginx = open('/etc/nginx/conf.d/ee-nginx.conf', 'w') ee_nginx = open('/etc/nginx/conf.d/ee-nginx.conf', 'w')
self.app.render((data), 'nginx-core.mustache', out=ee_nginx) self.app.render((data), 'nginx-core.mustache',
out=ee_nginx)
ee_nginx.close() ee_nginx.close()
data = dict() data = dict()
self.app.log.debug('writting the nginx configration to file' self.app.log.debug('writting the nginx configration to'
'/etc/nginx/conf.d/blockips.conf ') 'file /etc/nginx/conf.d/blockips.conf')
ee_nginx = open('/etc/nginx/conf.d/blockips.conf', 'w') ee_nginx = open('/etc/nginx/conf.d/blockips.conf', 'w')
self.app.render((data), 'blockips.mustache', out=ee_nginx) self.app.render((data), 'blockips.mustache', out=ee_nginx)
ee_nginx.close() ee_nginx.close()
self.app.log.debug('writting the nginx configration to file' self.app.log.debug('writting the nginx configration to'
'/etc/nginx/conf.d/fastcgi.conf ') ' file /etc/nginx/conf.d/fastcgi.conf')
ee_nginx = open('/etc/nginx/conf.d/fastcgi.conf', 'w') ee_nginx = open('/etc/nginx/conf.d/fastcgi.conf', 'w')
self.app.render((data), 'fastcgi.mustache', out=ee_nginx) self.app.render((data), 'fastcgi.mustache', out=ee_nginx)
ee_nginx.close() ee_nginx.close()
data = dict(php="9000", debug="9001") data = dict(php="9000", debug="9001")
self.app.log.debug('writting the nginx configration to file' self.app.log.debug('writting the nginx configration to'
'/etc/nginx/conf.d/upstream.conf ') 'file /etc/nginx/conf.d/upstream.conf ')
ee_nginx = open('/etc/nginx/conf.d/upstream.conf', 'w') ee_nginx = open('/etc/nginx/conf.d/upstream.conf', 'w')
self.app.render((data), 'upstream.mustache', out=ee_nginx) self.app.render((data), 'upstream.mustache', out=ee_nginx)
ee_nginx.close() ee_nginx.close()

1
ee/core/aptget.py

@ -126,7 +126,6 @@ class EEAptGet():
def __dependencies_loop(cache, deplist, pkg, onelevel=True): def __dependencies_loop(cache, deplist, pkg, onelevel=True):
""" Loops through pkg's dependencies. """ Loops through pkg's dependencies.
Returns a list with every package found. """ Returns a list with every package found. """
print("Inside")
if onelevel: if onelevel:
onelevellist = [] onelevellist = []
if not pkg.is_installed: if not pkg.is_installed:

Loading…
Cancel
Save