From 986ed19f64aeb1ecef59948f56b418201dc48b96 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Mon, 23 Sep 2019 12:24:10 +0200 Subject: [PATCH] Fix typo in stack --- CHANGELOG.md | 1 + wo/cli/plugins/secure.py | 1 - wo/cli/plugins/stack.py | 4 ++-- wo/core/variables.py | 37 +++++++++++++++---------------------- 4 files changed, 18 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d700c2..e8da00f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), #### Added - [STACK] UFW as a STACK available with `--ufw` +- [SECURE] `wo stack secure --ssh` to harden ssh security #### Changed diff --git a/wo/cli/plugins/secure.py b/wo/cli/plugins/secure.py index b8bf8b8..fc42521 100644 --- a/wo/cli/plugins/secure.py +++ b/wo/cli/plugins/secure.py @@ -11,7 +11,6 @@ from wo.core.services import WOService from wo.core.shellexec import WOShellExec from wo.core.template import WOTemplate from wo.core.variables import WOVariables -from wo.core.services import WOService def wo_secure_hook(app): diff --git a/wo/cli/plugins/stack.py b/wo/cli/plugins/stack.py index c5072a1..eee1e0b 100644 --- a/wo/cli/plugins/stack.py +++ b/wo/cli/plugins/stack.py @@ -650,7 +650,7 @@ class WOStackController(CementBaseController): # MySQLTuner if pargs.mysqltuner: - if os.path.isfile(/usr/bin/mysqltuner): + if os.path.isfile('/usr/bin/mysqltuner'): Log.debug(self, "Removing packages for MySQLTuner ") packages = packages + ['/usr/bin/mysqltuner'] @@ -900,7 +900,7 @@ class WOStackController(CementBaseController): # MySQLTuner if pargs.mysqltuner: - if os.path.isfile(/usr/bin/mysqltuner): + if os.path.isfile('/usr/bin/mysqltuner'): Log.debug(self, "Removing packages for MySQLTuner ") packages = packages + ['/usr/bin/mysqltuner'] diff --git a/wo/core/variables.py b/wo/core/variables.py index 2db38dd..9ad512b 100644 --- a/wo/core/variables.py +++ b/wo/core/variables.py @@ -15,7 +15,7 @@ class WOVariables(): # WordOps packages versions wo_wp_cli = "2.3.0" wo_adminer = "4.7.2" - wo_phpmyadmin = "4.9.0.1" + wo_phpmyadmin = "4.9.1" wo_extplorer = "2.1.13" wo_dashboard = "1.2" @@ -111,15 +111,6 @@ class WOVariables(): wo_nginx = ["nginx-custom", "nginx-wo"] wo_nginx_key = '188C9FB063F0247A' - # PHP repo and packages - if wo_distro == 'ubuntu': - wo_php_repo = "ppa:ondrej/php" - else: - wo_php_repo = ( - "deb https://packages.sury.org/php/ {codename} main" - .format(codename=wo_platform_codename)) - wo_php_key = 'AC0E47584A7A714D' - wo_php = ["php7.2-fpm", "php7.2-curl", "php7.2-gd", "php7.2-imap", "php7.2-readline", "php7.2-common", "php7.2-recode", "php7.2-cli", "php7.2-mbstring", "php7.2-intl", @@ -133,18 +124,6 @@ class WOVariables(): wo_php_extra = ["php-memcached", "php-imagick", "graphviz", "php-xdebug", "php-msgpack", "php-redis"] - # MySQL repo and packages - if wo_distro == 'ubuntu': - wo_mysql_repo = ("deb [arch=amd64,ppc64el] " - "http://sfo1.mirrors.digitalocean.com/mariadb/repo/" - "10.3/ubuntu {codename} main" - .format(codename=wo_platform_codename)) - 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 not wo_distro == 'raspbian': if (not wo_platform_codename == 'jessie'): wo_mysql = ["mariadb-server", "percona-toolkit", @@ -166,11 +145,25 @@ class WOVariables(): # Redis repo details if wo_distro == 'ubuntu': + wo_php_repo = "ppa:ondrej/php" wo_redis_repo = ("ppa:chris-lea/redis-server") + wo_goaccess_repo = ("ppa:alex-p/goaccess") + wo_mysql_repo = ("deb [arch=amd64,ppc64el] " + "http://sfo1.mirrors.digitalocean.com/mariadb/repo/" + "10.3/ubuntu {codename} main" + .format(codename=wo_platform_codename)) else: + wo_php_repo = ( + "deb https://packages.sury.org/php/ {codename} main" + .format(codename=wo_platform_codename)) + wo_php_key = 'AC0E47584A7A714D' wo_redis_repo = ("deb https://packages.sury.org/php/ {codename} all" .format(codename=wo_platform_codename)) + wo_mysql_repo = ("deb [arch=amd64,ppc64el] " + "http://sfo1.mirrors.digitalocean.com/mariadb/repo/" + "10.3/debian {codename} main" + .format(codename=wo_platform_codename)) wo_redis = ['redis-server']