Browse Source

Merge branch 'timezoneissue'

bugfixes
gau1991 10 years ago
parent
commit
310785365f
  1. 22
      ee/cli/plugins/stack.py
  2. 9
      ee/core/variables.py

22
ee/cli/plugins/stack.py

@ -493,7 +493,7 @@ class EEStackController(CementBaseController):
config['PHP']['post_max_size'] = '100M' config['PHP']['post_max_size'] = '100M'
config['PHP']['upload_max_filesize'] = '100M' config['PHP']['upload_max_filesize'] = '100M'
config['PHP']['max_execution_time'] = '300' config['PHP']['max_execution_time'] = '300'
config['PHP']['date.timezone'] = time.tzname[time.daylight] config['PHP']['date.timezone'] = EEVariables.ee_timezone
with open('/etc/php5/fpm/php.ini', with open('/etc/php5/fpm/php.ini',
encoding='utf-8', mode='w') as configfile: encoding='utf-8', mode='w') as configfile:
Log.debug(self, "Writting php configuration into " Log.debug(self, "Writting php configuration into "
@ -1024,10 +1024,22 @@ class EEStackController(CementBaseController):
shutil.move('/tmp/webgrind-master/', shutil.move('/tmp/webgrind-master/',
'{0}22222/htdocs/php/webgrind' '{0}22222/htdocs/php/webgrind'
.format(EEVariables.ee_webroot)) .format(EEVariables.ee_webroot))
EEShellExec.cmd_exec(self, "sed -i \"s\'/usr/local/bin/dot\'"
"/usr/bin/dot\'\" {0}22222/htdocs/" EEFileUtils.searchreplace(self, "{0}22222/htdocs/php/webgrind/"
"php/webgrind/config.php" "config.php"
.format(EEVariables.ee_webroot)) .format(EEVariables.ee_webroot),
"/usr/local/bin/dot", "/usr/bin/dot")
EEFileUtils.searchreplace(self, "{0}22222/htdocs/php/webgrind/"
"config.php"
.format(EEVariables.ee_webroot),
"Europe/Copenhagen",
EEVariables.ee_timezone)
EEFileUtils.searchreplace(self, "{0}22222/htdocs/php/webgrind/"
"config.php"
.format(EEVariables.ee_webroot),
"90", "100")
Log.debug(self, "Setting Privileges of webroot permission to " Log.debug(self, "Setting Privileges of webroot permission to "
"{0}22222/htdocs/php/webgrind/ file " "{0}22222/htdocs/php/webgrind/ file "
.format(EEVariables.ee_webroot)) .format(EEVariables.ee_webroot))

9
ee/core/variables.py

@ -28,6 +28,15 @@ class EEVariables():
ee_platform_version = platform.linux_distribution()[1] ee_platform_version = platform.linux_distribution()[1]
ee_platform_codename = os.popen("lsb_release -sc | tr -d \'\\n\'").read() ee_platform_codename = os.popen("lsb_release -sc | tr -d \'\\n\'").read()
# Get timezone of system
if os.path.isfile('/etc/timezone'):
with open("/etc/timezone", "r") as tzfile:
ee_timezone = tzfile.read().replace('\n', '')
if ee_timezone == "Etc/UTC":
ee_timezone = "UTC"
else:
ee_timezone = "UTC"
# Get FQDN of system # Get FQDN of system
ee_fqdn = socket.getfqdn() ee_fqdn = socket.getfqdn()

Loading…
Cancel
Save