Merge pull request #31 from WordOps/updating-configuration
Updating configuration
This commit is contained in:
@@ -10,6 +10,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
|
||||
### v3.9.5 - [Unreleased]
|
||||
|
||||
### Changed
|
||||
|
||||
- "--letsencrypt=subdomain" option
|
||||
|
||||
#### Fixed
|
||||
|
||||
- PHP 7.3 extras when php 7.2 isn't installed
|
||||
- acme.sh installation
|
||||
|
||||
### v3.9.4 - 2019-03-15
|
||||
|
||||
#### Added
|
||||
|
||||
2
install
2
install
@@ -10,7 +10,7 @@
|
||||
# Version 3.9.4 - 2019-03-15
|
||||
# -------------------------------------------------------------------------
|
||||
readonly wo_version_old="2.2.3"
|
||||
readonly wo_version_new="3.9.4"
|
||||
readonly wo_version_new="3.9.4.1"
|
||||
# CONTENTS
|
||||
# ---
|
||||
# 1. VARIABLES AND DECLARATIONS
|
||||
|
||||
@@ -329,9 +329,10 @@ class WOSiteCreateController(CementBaseController):
|
||||
dict(help="create wordpress single/multi site with redis cache",
|
||||
action='store_true')),
|
||||
(['-le', '--letsencrypt'],
|
||||
dict(help="configure letsencrypt ssl for the site", action='store_true')),
|
||||
(['--subdomain'],
|
||||
dict(help="specify the site is a subdomain for letsencrypt", action='store_true')),
|
||||
dict(help="configure letsencrypt ssl for the site",
|
||||
action='store' or 'store_const',
|
||||
choices=('on', 'off', 'subdomain', 'wildcard'),
|
||||
const='on', nargs='?')),
|
||||
(['--user'],
|
||||
dict(help="provide user for wordpress site")),
|
||||
(['--email'],
|
||||
@@ -453,7 +454,7 @@ class WOSiteCreateController(CementBaseController):
|
||||
# Check prompt
|
||||
check_prompt = input("Type \"y\" to continue [n]:")
|
||||
if check_prompt != "Y" and check_prompt != "y":
|
||||
Log.info(self, "Not using PHP 7.2 for site.")
|
||||
Log.info(self, "Not using PHP 7.3 for site.")
|
||||
data['php73'] = True
|
||||
data['basic'] = True
|
||||
php73 = 1
|
||||
@@ -678,8 +679,7 @@ class WOSiteCreateController(CementBaseController):
|
||||
Log.error(self, "Check the log for details: "
|
||||
"`tail /var/log/wo/wordops.log` and please try again")
|
||||
|
||||
if (self.app.pargs.letsencrypt and
|
||||
not pargs.letsencrypt == "wildcard"):
|
||||
if self.app.pargs.letsencrypt == "on":
|
||||
if stype in ['wpsubdomain']:
|
||||
Log.warn(
|
||||
self, "Wildcard domains are not supported in Lets Encrypt.\nWP SUBDOMAIN site will get SSL for primary site only.")
|
||||
@@ -707,7 +707,7 @@ class WOSiteCreateController(CementBaseController):
|
||||
Log.info(self, "Not using Let\'s encrypt for Site "
|
||||
" http://{0}".format(wo_domain))
|
||||
|
||||
if self.app.pargs.letsencrypt and self.app.pargs.subdomain:
|
||||
if self.app.pargs.letsencrypt == "subdomain":
|
||||
data['letsencrypt'] = True
|
||||
letsencrypt = True
|
||||
|
||||
@@ -1190,7 +1190,7 @@ class WOSiteUpdateController(CementBaseController):
|
||||
" http://{0}".format(wo_domain))
|
||||
return 0
|
||||
|
||||
if pargs.letsencrypt and (not pargs.subdomain):
|
||||
if pargs.letsencrypt == "on":
|
||||
if data['letsencrypt'] is True:
|
||||
if not os.path.isfile("{0}/conf/nginx/ssl.conf.disabled"
|
||||
.format(wo_site_webroot)):
|
||||
@@ -1237,7 +1237,7 @@ class WOSiteUpdateController(CementBaseController):
|
||||
Log.info(self, "Successfully Disabled SSl for Site "
|
||||
" http://{0}".format(wo_domain))
|
||||
|
||||
if pargs.letsencrypt and (pargs.subdomain):
|
||||
if pargs.letsencrypt == "subdomain":
|
||||
if data['letsencrypt'] is True:
|
||||
if not os.path.isfile("{0}/conf/nginx/ssl.conf.disabled"
|
||||
.format(wo_site_webroot)):
|
||||
|
||||
@@ -1183,7 +1183,10 @@ class WOStackController(CementBaseController):
|
||||
if self.app.pargs.php:
|
||||
Log.debug(self, "Setting apt_packages variable for PHP 7.2")
|
||||
if not (WOAptGet.is_installed(self, 'php7.2-fpm')):
|
||||
apt_packages = apt_packages + WOVariables.wo_php + WOVariables.wo_php_extra
|
||||
if not (WOAptGet.is_installed(self, 'php7.3-fpm')):
|
||||
apt_packages = apt_packages + WOVariables.wo_php + WOVariables.wo_php_extra
|
||||
else:
|
||||
apt_packages = apt_packages + WOVariables.wo_php
|
||||
else:
|
||||
Log.debug(self, "PHP 7.2 already installed")
|
||||
Log.info(self, "PHP 7.2 already installed")
|
||||
@@ -1192,7 +1195,10 @@ class WOStackController(CementBaseController):
|
||||
if self.app.pargs.php73:
|
||||
Log.debug(self, "Setting apt_packages variable for PHP 7.3")
|
||||
if not WOAptGet.is_installed(self, 'php7.3-fpm'):
|
||||
apt_packages = apt_packages + WOVariables.wo_php73
|
||||
if not (WOAptGet.is_installed(self, 'php7.2-fpm')):
|
||||
apt_packages = apt_packages + WOVariables.wo_php73 + WOVariables.wo_php_extra
|
||||
else:
|
||||
apt_packages = apt_packages + WOVariables.wo_php73
|
||||
else:
|
||||
Log.debug(self, "PHP 7.3 already installed")
|
||||
Log.info(self, "PHP 7.3 already installed")
|
||||
@@ -1398,7 +1404,10 @@ class WOStackController(CementBaseController):
|
||||
if self.app.pargs.php73:
|
||||
Log.debug(self, "Removing apt_packages variable of PHP 7.3")
|
||||
if not WOAptGet.is_installed(self, 'php7.3-fpm'):
|
||||
apt_packages = apt_packages + WOVariables.wo_php73
|
||||
if not (WOAptGet.is_installed(self, 'php7.2-fpm')):
|
||||
apt_packages = apt_packages + WOVariables.wo_php73 + WOVariables.wo_php_extra
|
||||
else:
|
||||
apt_packages = apt_packages + WOVariables.wo_php73
|
||||
|
||||
# REDIS
|
||||
if self.app.pargs.redis:
|
||||
@@ -1534,7 +1543,10 @@ class WOStackController(CementBaseController):
|
||||
if self.app.pargs.php73:
|
||||
Log.debug(self, "Removing apt_packages variable of PHP 7.3")
|
||||
if not WOAptGet.is_installed(self, 'php7.3-fpm'):
|
||||
apt_packages = apt_packages + WOVariables.wo_php73
|
||||
if not (WOAptGet.is_installed(self, 'php7.2-fpm')):
|
||||
apt_packages = apt_packages + WOVariables.wo_php73 + WOVariables.wo_php_extra
|
||||
else:
|
||||
apt_packages = apt_packages + WOVariables.wo_php73
|
||||
else:
|
||||
Log.error(self, "Cannot Purge PHP 7.3. not found.")
|
||||
# WP-CLI
|
||||
|
||||
Reference in New Issue
Block a user