Browse Source

Fixing small issue

bugfixes
gau1991 10 years ago
parent
commit
7a5834b791
  1. 19
      ee/cli/plugins/log.py
  2. 2
      ee/cli/plugins/stack.py

19
ee/cli/plugins/log.py

@ -102,12 +102,14 @@ class EELogShowController(CementBaseController):
if os.path.isfile('/var/log/mysql/mysql-slow.log'): if os.path.isfile('/var/log/mysql/mysql-slow.log'):
self.msg = self.msg + ['/var/log/mysql/mysql-slow.log'] self.msg = self.msg + ['/var/log/mysql/mysql-slow.log']
else: else:
Log.info(self, "MySQL slow-log not found, skipepd") Log.info(self, "MySQL slow-log not found, skipped")
else: else:
Log.warn(self, "Remote MySQL found, EasyEngine is not able to" Log.warn(self, "Remote MySQL found, EasyEngine is not able to"
"show MySQL log file") "show MySQL log file")
if self.app.pargs.site_name: if self.app.pargs.site_name:
if not os.path.isdir(webroot):
Log.error(self, "Site not present, quitting")
if self.app.pargs.access: if self.app.pargs.access:
self.msg = self.msg + ["{0}/{1}/logs/access.log" self.msg = self.msg + ["{0}/{1}/logs/access.log"
.format(EEVariables.ee_webroot, .format(EEVariables.ee_webroot,
@ -119,17 +121,24 @@ class EELogShowController(CementBaseController):
if self.app.pargs.wp: if self.app.pargs.wp:
webroot = "{0}{1}".format(EEVariables.ee_webroot, webroot = "{0}{1}".format(EEVariables.ee_webroot,
self.app.pargs.site_name) self.app.pargs.site_name)
if not os.path.isdir('{0}/htdocs/wp-content'.format(webroot)):
if not os.path.isfile('{0}/logs/debug.log' if not os.path.isfile('{0}/logs/debug.log'
.format(webroot)): .format(webroot)):
if not os.path.isfile('{0}/htdocs/wp-content/debug.log' if not os.path.isfile('{0}/htdocs/wp-content/debug.log'
.format(webroot)): .format(webroot)):
open("{0}/htdocs/wp-content/debug.log".format(webroot), open("{0}/htdocs/wp-content/debug.log"
.format(webroot),
encoding='utf-8', mode='a').close() encoding='utf-8', mode='a').close()
EEShellExec.cmd_exec(self, "chown {1}: {0}/htdocs/wp-" EEShellExec.cmd_exec(self, "chown {1}: {0}/htdocs/"
"content/debug.log" "wp-content/debug.log"
"".format(webroot, "".format(webroot,
EEVariables.ee_php_user) EEVariables
.ee_php_user)
) )
else:
Log.info(self, "Site is not WordPress site, skipping "
"WordPress logs")
# create symbolic link for debug log # create symbolic link for debug log
EEFileUtils.create_symlink(self, ["{0}/htdocs/wp-content/" EEFileUtils.create_symlink(self, ["{0}/htdocs/wp-content/"

2
ee/cli/plugins/stack.py

@ -1632,6 +1632,7 @@ class EEStackController(CementBaseController):
apt_packages = apt_packages + EEVariables.ee_php apt_packages = apt_packages + EEVariables.ee_php
if self.app.pargs.hhvm: if self.app.pargs.hhvm:
if EEAptGet.is_installed(self, 'hhvm'):
Log.debug(self, "Removing apt_packages varible of HHVM") Log.debug(self, "Removing apt_packages varible of HHVM")
apt_packages = apt_packages + EEVariables.ee_hhvm apt_packages = apt_packages + EEVariables.ee_hhvm
@ -1751,6 +1752,7 @@ class EEStackController(CementBaseController):
Log.debug(self, "Purge apt_packages variable PHP") Log.debug(self, "Purge apt_packages variable PHP")
apt_packages = apt_packages + EEVariables.ee_php apt_packages = apt_packages + EEVariables.ee_php
if self.app.pargs.hhvm: if self.app.pargs.hhvm:
if EEAptGet.is_installed(self, 'hhvm'):
Log.debug(self, "Removing apt_packages varible of HHVM") Log.debug(self, "Removing apt_packages varible of HHVM")
apt_packages = apt_packages + EEVariables.ee_hhvm apt_packages = apt_packages + EEVariables.ee_hhvm
if self.app.pargs.mysql: if self.app.pargs.mysql:

Loading…
Cancel
Save