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')),
(['--mysql'],
dict(help='Install MySQL stack', action='store_true')),
(['--mariabackup'],
dict(help='Install MariaBackup stack', action='store_true')),
(['--mysqlclient'],
dict(help='Install MySQL client for remote MySQL server',
action='store_true')),

View File

@@ -47,7 +47,7 @@ class WORepo():
Log.debug(self, "{0}".format(e))
Log.error(self, "Unable to add repo")
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))
def remove(self, ppa=None, repo_url=None):

View File

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