Browse Source

lowercase distros

servicefixes
harshadyeola 10 years ago
parent
commit
79ffd96dee
  1. 2
      ee/cli/plugins/secure.py
  2. 6
      ee/cli/plugins/stack.py
  3. 4
      ee/cli/plugins/stack_upgrade.py
  4. 2
      ee/core/apt_repo.py
  5. 13
      ee/core/variables.py

2
ee/cli/plugins/secure.py

@ -93,7 +93,7 @@ class EESecureController(CementBaseController):
Log.info(self, "Please Enter valid port number :")
port = input("EasyEngine admin port [22222]:")
self.app.pargs.user_input = port
if EEVariables.ee_platform_distro == 'Ubuntu':
if EEVariables.ee_platform_distro == 'ubuntu':
EEShellExec.cmd_exec(self, "sed -i \"s/listen.*/listen "
"{port} default_server ssl spdy;/\" "
"/etc/nginx/sites-available/22222"

6
ee/cli/plugins/stack.py

@ -221,7 +221,7 @@ class EEStackController(CementBaseController):
nc.savef('/etc/nginx/nginx.conf')
# Custom Nginx configuration by EasyEngine
if EEVariables.ee_platform_distro == 'Ubuntu':
if EEVariables.ee_platform_distro == 'ubuntu':
data = dict(version=EEVariables.ee_version,
Ubuntu=True)
else:
@ -481,7 +481,7 @@ class EEStackController(CementBaseController):
# For debian install xdebug
if (EEVariables.ee_platform_distro == "debian" and
EEVariables.ee_platform_distro == 'wheezy'):
EEVariables.ee_platform_codename == 'wheezy'):
EEShellExec.cmd_exec(self, "pecl install xdebug")
with open("/etc/php5/mods-available/xdebug.ini",
@ -1461,7 +1461,7 @@ class EEStackController(CementBaseController):
if self.app.pargs.nginx:
Log.debug(self, "Setting apt_packages variable for Nginx")
if EEVariables.ee_platform_distro == 'Debian':
if EEVariables.ee_platform_distro == 'debian':
check_nginx = 'nginx-extras'
else:
check_nginx = 'nginx-custom'

4
ee/cli/plugins/stack_upgrade.py

@ -48,7 +48,7 @@ class EEStackUpgradeController(CementBaseController):
@expose(hide=True)
def upgrade_php56(self):
if EEVariables.ee_platform_distro == "Ubuntu":
if EEVariables.ee_platform_distro == "ubuntu":
if os.path.isfile("/etc/apt/sources.list.d/ondrej-php5-5_6-{0}."
"list".format(EEVariables.ee_platform_codename)):
Log.error(self, "Unable to find PHP 5.5")
@ -67,7 +67,7 @@ class EEStackUpgradeController(CementBaseController):
if start_upgrade != "Y" and start_upgrade != "y":
Log.error(self, "Not starting PHP package update")
if EEVariables.ee_platform_distro == "Ubuntu":
if EEVariables.ee_platform_distro == "ubuntu":
EERepo.remove(self, ppa="ppa:ondrej/php5")
EERepo.add(self, ppa=EEVariables.ee_php_repo)
else:

2
ee/core/apt_repo.py

@ -47,7 +47,7 @@ class EERepo():
Log.debug(self, "{0}".format(e))
Log.error(self, "Unable to add repo")
if ppa is not None:
if EEVariables.ee_platform_distro == 'squeeze':
if EEVariables.ee_platform_codename == 'squeeze':
print("Cannot add repo for {distro}"
.format(distro=EEVariables.ee_platform_distro))
else:

13
ee/core/variables.py

@ -24,7 +24,7 @@ class EEVariables():
ee_date = datetime.datetime.now().strftime('%d%b%Y%H%M%S')
# EasyEngine core variables
ee_platform_distro = platform.linux_distribution()[0]
ee_platform_distro = platform.linux_distribution()[0].lower()
ee_platform_version = platform.linux_distribution()[1]
ee_platform_codename = os.popen("lsb_release -sc | tr -d \'\\n\'").read()
@ -76,7 +76,7 @@ class EEVariables():
# EasyEngine stack installation varibales
# Nginx repo and packages
if ee_platform_distro == 'Ubuntu':
if ee_platform_distro == 'ubuntu':
ee_nginx_repo = "ppa:rtcamp/nginx"
ee_nginx = ["nginx-custom", "nginx-common"]
elif ee_platform_distro == 'debian':
@ -85,7 +85,7 @@ class EEVariables():
ee_nginx = ["nginx-extras", "nginx-common"]
# PHP repo and packages
if ee_platform_distro == 'Ubuntu':
if ee_platform_distro == 'ubuntu':
ee_php_repo = "ppa:ondrej/php5-5.6"
elif ee_platform_codename == 'wheezy':
ee_php_repo = ("deb http://packages.dotdeb.org {codename}-php56 all"
@ -95,11 +95,11 @@ class EEVariables():
"php5-mysql", "php5-cli", "php5-memcache", "php5-imagick",
"memcached", "graphviz", "php-pear", "php5-dev"]
if ee_platform_distro == 'Ubuntu' or ee_platform_codename == 'jessie':
if ee_platform_distro == 'ubuntu' or ee_platform_codename == 'jessie':
ee_php = ee_php + ["php5-xdebug"]
# MySQL repo and packages
if ee_platform_distro == 'Ubuntu':
if ee_platform_distro == 'ubuntu':
ee_mysql_repo = ("deb http://mirror.aarnet.edu.au/pub/MariaDB/repo/"
"10.0/ubuntu {codename} main"
.format(codename=ee_platform_codename))
@ -110,7 +110,6 @@ class EEVariables():
ee_mysql = ["mariadb-server", "percona-toolkit"]
# Postfix repo and packages
ee_postfix_repo = ""
ee_postfix = ["postfix"]
@ -132,7 +131,7 @@ class EEVariables():
# HHVM repo details
# 12.04 requires boot repository
if ee_platform_distro == 'Ubuntu':
if ee_platform_distro == 'ubuntu':
if ee_platform_codename == "precise":
ee_boost_repo = ("ppa:mapnik/boost")

Loading…
Cancel
Save