Browse Source

Fixing small issue

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

31
ee/cli/plugins/log.py

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

10
ee/cli/plugins/stack.py

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

Loading…
Cancel
Save