diff --git a/ee/cli/plugins/site.py b/ee/cli/plugins/site.py index 58dbc01a..c0b8d993 100644 --- a/ee/cli/plugins/site.py +++ b/ee/cli/plugins/site.py @@ -515,20 +515,20 @@ class EESiteCreateController(CementBaseController): data['pagespeed'] = False pagespeed = 0 - if (cache == 'redis' not self.app.pargs.experimental) and : + if (cache == 'redis' and (not self.app.pargs.experimental)): Log.info(self, "Redis is experimental feature and it may not" "work with all CSS/JS/Cache of your site.\nYou can " - "disable it by passing --redis=off later.\nDo you wish" + "disable it by changing cache later.\nDo you wish" " to enable Redis now for {0}?".format(ee_domain)) # Check prompt - check_prompt = input("Type \"y\" to continue [n]:") - if check_prompt != "Y" and check_prompt != "y": - Log.info(self, "Not using Redis for site.") - cache = 'basic' - data['redis'] = False - data['basic'] = True - self.app.pargs.redis = False + check_prompt = input("Type \"y\" to continue [n]:") + if check_prompt != "Y" and check_prompt != "y": + Log.info(self, "Not using Redis for site.") + cache = 'basic' + data['redis'] = False + data['basic'] = True + self.app.pargs.redis = False # self.app.args.print_help() # if not data: @@ -1223,7 +1223,7 @@ class EESiteUpdateController(CementBaseController): " `tail /var/log/ee/ee.log` & Try Again!!!") return 1 - if oldcachetype == 'redis' and not data['rediss']: + if oldcachetype == 'redis' and not data['redis']: try: uninstallwp_plugin(self, 'redis-cache', data) except SiteError as e: diff --git a/ee/cli/plugins/site_functions.py b/ee/cli/plugins/site_functions.py index 2327ecc1..93e8eda8 100644 --- a/ee/cli/plugins/site_functions.py +++ b/ee/cli/plugins/site_functions.py @@ -603,6 +603,10 @@ def site_package_check(self, stype): "wp-cli-{0}.phar" .format(EEVariables.ee_wp_cli), "/usr/bin/wp", "WP-CLI"]] + if self.app.pargs.redis: + Log.debug(self, "Setting apt_packages variable for redis") + if not EEAptGet.is_installed(self, 'redis-server'): + apt_packages = apt_packages + EEVariables.ee_redis if self.app.pargs.hhvm: if platform.architecture()[0] is '32bit': diff --git a/ee/cli/plugins/stack.py b/ee/cli/plugins/stack.py index 6fca7199..548e7d5e 100644 --- a/ee/cli/plugins/stack.py +++ b/ee/cli/plugins/stack.py @@ -529,7 +529,7 @@ class EEStackController(CementBaseController): data = dict() Log.debug(self, 'Writting the nginx configuration to ' 'file /etc/nginx/common/redis.conf') - ee_nginx = open('/etc/nginx/common/php-hhvm.conf', + ee_nginx = open('/etc/nginx/common/redis.conf', encoding='utf-8', mode='w') self.app.render((data), 'redis.mustache', out=ee_nginx)