From e9481aa964cc8e4cab4c537168f59af5eb9d87c7 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Thu, 1 Aug 2019 11:09:49 +0200 Subject: [PATCH] Update changelog, set binary full path --- CHANGELOG.md | 1 + wo/cli/plugins/info.py | 6 +++--- wo/cli/plugins/site.py | 2 +- wo/cli/plugins/site_functions.py | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ad0290..c640687 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Proftpd stack now secured with TLS - New Nginx package built with Brotli from operating system libraries - Brotli configuration with only well compressible MIME types +- WordPress site url automatically updated to `https://domain.tld` when using `-le/--letsencrypt` flag #### Changed diff --git a/wo/cli/plugins/info.py b/wo/cli/plugins/info.py index d5daaac..efaf767 100644 --- a/wo/cli/plugins/info.py +++ b/wo/cli/plugins/info.py @@ -225,7 +225,7 @@ class WOInfoController(CementBaseController): "-f1 | tr -d '\n'").read() host = "localhost" port = os.popen("/usr/bin/mysql -e \"show variables\" | " - "grep ^port | awk " + "/bin/grep ^port | awk " "'{print($2)}' | tr -d '\n'").read() wait_timeout = os.popen("/usr/bin/mysql -e \"show variables\" | grep " "^wait_timeout | awk '{print($2)}' | " @@ -239,10 +239,10 @@ class WOInfoController(CementBaseController): "grep Max_used_connections | awk " "'{print($2)}' | tr -d '\n'").read() datadir = os.popen("/usr/bin/mysql -e \"show variables\" | " - "grep datadir | awk" + "/bin/grep datadir | awk" " '{print($2)}' | tr -d '\n'").read() socket = os.popen("/usr/bin/mysql -e \"show variables\" | " - "grep \"^socket\" | " + "/bin/grep \"^socket\" | " "awk '{print($2)}' | tr -d '\n'").read() data = dict(version=version, host=host, port=port, wait_timeout=wait_timeout, diff --git a/wo/cli/plugins/site.py b/wo/cli/plugins/site.py index 901173d..2cb7bf8 100644 --- a/wo/cli/plugins/site.py +++ b/wo/cli/plugins/site.py @@ -237,7 +237,7 @@ class WOSiteController(CementBaseController): WOFileUtils.chdir(self, wo_site_webroot) try: - subprocess.call(['bash']) + subprocess.call(['/bin/bash']) except OSError as e: Log.debug(self, "{0}{1}".format(e.errno, e.strerror)) Log.error(self, "unable to change directory") diff --git a/wo/cli/plugins/site_functions.py b/wo/cli/plugins/site_functions.py index 07d5abd..ae6e430 100644 --- a/wo/cli/plugins/site_functions.py +++ b/wo/cli/plugins/site_functions.py @@ -38,7 +38,7 @@ def pre_run_checks(self): try: Log.debug(self, "checking NGINX configuration ...") FNULL = open('/dev/null', 'w') - ret = subprocess.check_call(["nginx", "-t"], stdout=FNULL, + subprocess.check_call(["/usr/sbin/nginx", "-t"], stdout=FNULL, stderr=subprocess.STDOUT) except CalledProcessError as e: Log.debug(self, "{0}".format(str(e))) @@ -89,7 +89,7 @@ def setupdomain(self, data): try: Log.debug(self, "Checking generated nginx conf, please wait...") FNULL = open('/dev/null', 'w') - ret = subprocess.check_call(["nginx", "-t"], stdout=FNULL, + subprocess.check_call(["/usr/sbin/nginx", "-t"], stdout=FNULL, stderr=subprocess.STDOUT) Log.info(self, "[" + Log.ENDC + "Done" + Log.OKBLUE + "]") except CalledProcessError as e: