|
|
@ -614,6 +614,40 @@ def site_package_check(self, stype): |
|
|
|
if not EEAptGet.is_installed(self, 'redis-server'): |
|
|
|
apt_packages = apt_packages + EEVariables.ee_redis |
|
|
|
|
|
|
|
if os.path.isfile("/etc/nginx/nginx.conf") and (not |
|
|
|
os.path.isfile("/etc/nginx/common/redis.conf")): |
|
|
|
|
|
|
|
data = dict() |
|
|
|
Log.debug(self, 'Writting the nginx configuration to ' |
|
|
|
'file /etc/nginx/common/redis.conf') |
|
|
|
ee_nginx = open('/etc/nginx/common/redis.conf', |
|
|
|
encoding='utf-8', mode='w') |
|
|
|
self.app.render((data), 'redis.mustache', |
|
|
|
out=ee_nginx) |
|
|
|
ee_nginx.close() |
|
|
|
|
|
|
|
if os.path.isfile("/etc/nginx/nginx.conf") and (not |
|
|
|
os.path.isfile("/etc/nginx/common/redis-hhvm.conf")): |
|
|
|
|
|
|
|
data = dict() |
|
|
|
Log.debug(self, 'Writting the nginx configuration to ' |
|
|
|
'file /etc/nginx/common/redis-hhvm.conf') |
|
|
|
ee_nginx = open('/etc/nginx/common/redis-hhvm.conf', |
|
|
|
encoding='utf-8', mode='w') |
|
|
|
self.app.render((data), 'redis-hhvm.mustache', |
|
|
|
out=ee_nginx) |
|
|
|
ee_nginx.close() |
|
|
|
|
|
|
|
if os.path.isfile("/etc/nginx/conf.d/upstream.conf"): |
|
|
|
if not EEFileUtils.grep(self, "/etc/nginx/conf.d/" |
|
|
|
"upstream.conf", |
|
|
|
"redis"): |
|
|
|
with open("/etc/nginx/conf.d/upstream.conf", |
|
|
|
"a") as redis_file: |
|
|
|
redis_file.write("upstream redis {\n" |
|
|
|
" server 127.0.0.1:6379;\n" |
|
|
|
" keepalive 10;\n}") |
|
|
|
|
|
|
|
if self.app.pargs.hhvm: |
|
|
|
if platform.architecture()[0] is '32bit': |
|
|
|
Log.error(self, "HHVM is not supported by 32bit system") |
|
|
|