Some changes for LetsEncrypt
This commit is contained in:
17
install
17
install
@@ -66,7 +66,7 @@ fi
|
||||
wo_branch=$1
|
||||
migration=0
|
||||
readonly wo_version_old="2.2.3"
|
||||
readonly wo_version_new="3.8.6"
|
||||
readonly wo_version_new="3.8.9"
|
||||
readonly wo_log_dir=/var/log/wo/
|
||||
readonly wo_install_log=/var/log/wo/install.log
|
||||
readonly wo_linux_distro=$(lsb_release -i | awk '{print $3}')
|
||||
@@ -254,11 +254,11 @@ function wo_sync_db()
|
||||
# Copy the previous upstream.conf
|
||||
cp /etc/nginx/conf.d/upstream.conf /etc/nginx/conf.d/upstream.bak
|
||||
# Replace the ports for PHP 7.2
|
||||
sed -i "s/127.0.0.1:9000/127.0.0.1:9072/g" /etc/nginx/conf.d/upstream.conf &>> /dev/null
|
||||
sed -i "s/127.0.0.1:9070/127.0.0.1:9072/g" /etc/nginx/conf.d/upstream.conf &>> /dev/null
|
||||
sed -i "s/9000/9072/" /etc/nginx/conf.d/upstream.conf &>> /dev/null
|
||||
sed -i "s/9070/9072/" /etc/nginx/conf.d/upstream.conf &>> /dev/null
|
||||
# Replace the ports for debug PHP 7.2
|
||||
sed -i "s/127.0.0.1:9001/127.0.0.1:9172/g" /etc/nginx/conf.d/upstream.conf &>> /dev/null
|
||||
sed -i "s/127.0.0.1:9170/127.0.0.1:9172/g" /etc/nginx/conf.d/upstream.conf &>> /dev/null
|
||||
sed -i "s/9001/9172/" /etc/nginx/conf.d/upstream.conf &>> /dev/null
|
||||
sed -i "s/9170/9172/" /etc/nginx/conf.d/upstream.conf &>> /dev/null
|
||||
fi
|
||||
|
||||
###
|
||||
@@ -644,11 +644,16 @@ if [ ! -f /usr/local/bin/wo ]; then
|
||||
wo_lib_echo "Installing depedencies" | tee -ai $wo_install_log
|
||||
wo_install_dep | tee -ai $wo_install_log
|
||||
wo_lib_echo "Installing WordOps $wo_branch" | tee -ai $wo_install_log
|
||||
secure_wo_db | tee -ai $WO_INSTALL_LOG
|
||||
wo_upgrade_php | tee -ai $wo_install_log
|
||||
wo_install | tee -ai $wo_install_log
|
||||
wo_update_latest | tee -ai $wo_install_log
|
||||
wo_lib_echo "Running post-install steps" | tee -ai $wo_install_log
|
||||
secure_wo_db | tee -ai $WO_INSTALL_LOG
|
||||
wo_git_init | tee -ai $wo_install_log
|
||||
|
||||
service nginx reload &>> /dev/null
|
||||
service php7.2-fpm restart &>> /dev/null
|
||||
wo_update_wp_cli | tee -ai $wo_install_log
|
||||
else
|
||||
wo -v 2>&1 | grep $wo_version_new &>> /dev/null
|
||||
if [[ $? -ne 0 ]];then
|
||||
|
||||
2
setup.py
2
setup.py
@@ -58,7 +58,7 @@ if not os.path.isfile('/root/.gitconfig'):
|
||||
shutil.copy2(os.path.expanduser("~")+'/.gitconfig', '/root/.gitconfig')
|
||||
|
||||
setup(name='wo',
|
||||
version='3.9.0',
|
||||
version='3.9.1',
|
||||
description=long_description,
|
||||
long_description=long_description,
|
||||
classifiers=[],
|
||||
|
||||
@@ -1244,17 +1244,6 @@ def cloneLetsEncrypt(self):
|
||||
|
||||
def setupLetsEncrypt(self, wo_domain_name):
|
||||
wo_wp_email = WOVariables.wo_email
|
||||
while not wo_wp_email:
|
||||
try:
|
||||
wo_wp_email = input('Enter WordPress email: ')
|
||||
except EOFError as e:
|
||||
Log.debug(self, "{0}".format(e))
|
||||
raise SiteError("input WordPress username failed")
|
||||
|
||||
if not os.path.isdir("/opt/letsencrypt"):
|
||||
cloneLetsEncrypt(self)
|
||||
WOFileUtils.chdir(self, '/opt/letsencrypt')
|
||||
WOShellExec.cmd_exec(self, "git pull")
|
||||
|
||||
if os.path.isfile("/etc/letsencrypt/renewal/{0}.conf".format(wo_domain_name)):
|
||||
Log.debug(self, "Let's Encrypt certificate found for the domain: {0}"
|
||||
@@ -1262,9 +1251,8 @@ def setupLetsEncrypt(self, wo_domain_name):
|
||||
ssl= archivedCertificateHandle(self,wo_domain_name,wo_wp_email)
|
||||
else:
|
||||
Log.warn(self,"Please wait while we fetch the new HTTPS certificate for your site.\nIt may take a few minutes depending on the network.")
|
||||
ssl = WOShellExec.cmd_exec(self, "./letsencrypt-auto --rsa-key-size 4096 certonly --webroot -w /var/www/{0}/htdocs/ -d {0} -d www.{0} "
|
||||
.format(wo_domain_name)
|
||||
+ "--email {0} --text --agree-tos".format(wo_wp_email))
|
||||
ssl = WOShellExec.cmd_exec(self, "/usr/local/bin/wo-acme -d {0} --standalone "
|
||||
.format(wo_domain_name))
|
||||
if ssl:
|
||||
Log.info(self, "The HTTPS setup for your website is successfully completed!")
|
||||
Log.info(self, "Your certificate and chain have been saved in "
|
||||
|
||||
@@ -12,7 +12,7 @@ class WOVariables():
|
||||
"""Intialization of core variables"""
|
||||
|
||||
# WordOps version
|
||||
wo_version = "3.8.6"
|
||||
wo_version = "3.9.1"
|
||||
# WordOps packages versions
|
||||
wo_wp_cli = "2.0.1"
|
||||
wo_adminer = "4.6.3"
|
||||
|
||||
Reference in New Issue
Block a user