Fix variables

This commit is contained in:
VirtuBox
2019-08-27 22:21:22 +02:00
parent 1c3b303ee4
commit 8db9521a9a
3 changed files with 23 additions and 29 deletions

View File

@@ -63,8 +63,6 @@ class WOStackController(CementBaseController):
dict(help='Install PHP 7.3 stack', action='store_true')), dict(help='Install PHP 7.3 stack', action='store_true')),
(['--mysql'], (['--mysql'],
dict(help='Install MySQL stack', action='store_true')), dict(help='Install MySQL stack', action='store_true')),
(['--mariabackup'],
dict(help='Install MariaBackup stack', action='store_true')),
(['--mysqlclient'], (['--mysqlclient'],
dict(help='Install MySQL client for remote MySQL server', dict(help='Install MySQL client for remote MySQL server',
action='store_true')), action='store_true')),

View File

@@ -47,7 +47,7 @@ class WORepo():
Log.debug(self, "{0}".format(e)) Log.debug(self, "{0}".format(e))
Log.error(self, "Unable to add repo") Log.error(self, "Unable to add repo")
if ppa is not None: if ppa is not None:
WOShellExec.cmd_exec(self, "add-apt-repository -y '{ppa_name}'" WOShellExec.cmd_exec(self, "add-apt-repository -yu '{ppa_name}'"
.format(ppa_name=ppa)) .format(ppa_name=ppa))
def remove(self, ppa=None, repo_url=None): def remove(self, ppa=None, repo_url=None):

View File

@@ -88,28 +88,24 @@ class WOVariables():
# Nginx repo and packages # Nginx repo and packages
if wo_distro == 'ubuntu': if wo_distro == 'ubuntu':
wo_nginx_repo = "ppa:wordops/nginx-wo" wo_nginx_repo = "ppa:wordops/nginx-wo"
elif wo_distro == 'debian': else:
if wo_platform_codename == 'jessie': if wo_distro == 'debian':
wo_nginx_repo = ("deb http://download.opensuse.org" if wo_platform_codename == 'jessie':
"/repositories/home:" wo_deb_repo = "Debian_8.0"
"/virtubox:/WordOps/Debian_8.0/ /") elif wo_platform_codename == 'stretch':
elif wo_platform_codename == 'stretch': wo_deb_repo = "Debian_9.0"
wo_nginx_repo = ("deb http://download.opensuse.org" elif wo_platform_codename == 'buster':
"/repositories/home:" wo_deb_repo = "Debian_10"
"/virtubox:/WordOps/Debian_9.0/ /") elif wo_distro == 'raspbian':
elif wo_platform_codename == 'buster': if wo_platform_codename == 'stretch':
wo_nginx_repo = ("deb http://download.opensuse.org" wo_deb_repo = "Raspbian_9.0"
"/repositories/home:" elif wo_platform_codename == 'buster':
"/virtubox:/WordOps/Debian_10/ /") wo_deb_repo = "Raspbian_10"
elif wo_distro == 'raspbian': # debian/raspbian nginx repository
if wo_platform_codename == 'stretch': wo_nginx_repo = ("deb http://download.opensuse.org"
wo_nginx_repo = ("deb http://download.opensuse.org/" "/repositories/home:"
"repositories/home:" "/virtubox:/WordOps/{0}/ /"
"/virtubox:/WordOps/Raspbian_9.0/ /") .format(wo_deb_repo))
if wo_platform_codename == 'buster':
wo_nginx_repo = ("deb http://download.opensuse.org/"
"repositories/home:"
"/virtubox:/WordOps/Raspbian_10/ /")
wo_nginx = ["nginx-custom", "nginx-wo"] wo_nginx = ["nginx-custom", "nginx-wo"]
wo_nginx_key = '188C9FB063F0247A' wo_nginx_key = '188C9FB063F0247A'
@@ -117,7 +113,6 @@ class WOVariables():
# PHP repo and packages # PHP repo and packages
if wo_distro == 'ubuntu': if wo_distro == 'ubuntu':
wo_php_repo = "ppa:ondrej/php" wo_php_repo = "ppa:ondrej/php"
wo_php_key = ''
else: else:
wo_php_repo = ( wo_php_repo = (
"deb https://packages.sury.org/php/ {codename} main" "deb https://packages.sury.org/php/ {codename} main"
@@ -143,15 +138,16 @@ class WOVariables():
"http://sfo1.mirrors.digitalocean.com/mariadb/repo/" "http://sfo1.mirrors.digitalocean.com/mariadb/repo/"
"10.3/ubuntu {codename} main" "10.3/ubuntu {codename} main"
.format(codename=wo_platform_codename)) .format(codename=wo_platform_codename))
if wo_distro == 'raspbian':
wo_mysql = ["mariadb-server", "percona-toolkit",
"python3-mysqldb"]
else: else:
wo_mysql_repo = ("deb [arch=amd64,ppc64el] " wo_mysql_repo = ("deb [arch=amd64,ppc64el] "
"http://sfo1.mirrors.digitalocean.com/mariadb/repo/" "http://sfo1.mirrors.digitalocean.com/mariadb/repo/"
"10.3/debian {codename} main" "10.3/debian {codename} main"
.format(codename=wo_platform_codename)) .format(codename=wo_platform_codename))
if wo_distro == 'raspbian':
wo_mysql = ["mariadb-server", "percona-toolkit",
"python3-mysqldb"]
else:
wo_mysql = ["mariadb-server", "percona-toolkit", wo_mysql = ["mariadb-server", "percona-toolkit",
"python3-mysqldb", "mariadb-backup"] "python3-mysqldb", "mariadb-backup"]