Browse Source

setup nginx package as ee needs

feature/refactor-php
harshadyeola 10 years ago
parent
commit
fc347ffbdd
  1. 1
      ee/cli/plugins/site_functions.py
  2. 15
      ee/cli/plugins/stack.py

1
ee/cli/plugins/site_functions.py

@ -661,6 +661,7 @@ def site_package_check(self, stype):
if EEAptGet.is_installed(self, 'nginx-plus'):
# do something
# do post nginx installation configuration
apt_packages = ["nginx-plus"]
packages = []
apt_packages = apt_packages + EEVariables.ee_nginx
stack.post_pref(apt_packages , packages)

15
ee/cli/plugins/stack.py

@ -329,6 +329,21 @@ class EEStackController(CementBaseController):
out=ee_nginx)
ee_nginx.close()
# Nginx-Plus does not have nginx package structure like this
# So craeting directories
if set(["nginx-plus"]).issubset(set(apt_packages)):
if not os.path.exists('/etc/nginx/sites-available'):
Log.debug(self, 'Creating directory'
'/etc/nginx/sites-available')
os.makedirs('/etc/nginx/sites-available')
if not os.path.exists('/etc/nginx/sites-enabled'):
Log.debug(self, 'Creating directory'
'/etc/nginx/sites-available')
os.makedirs('/etc/nginx/sites-enabled')
# 22222 port settings
Log.debug(self, 'Writting the nginx configuration to '
'file /etc/nginx/sites-available/'

Loading…
Cancel
Save