Merge pull request #36 from WordOps/updating-configuration
Updating configuration
This commit is contained in:
@@ -60,4 +60,4 @@ script:
|
|||||||
- sudo wp --allow-root --info
|
- sudo wp --allow-root --info
|
||||||
- sudo bash -c 'nginx -T 2>&1 > /var/log/wo/nginx.log 2>&1' || sudo tail -n50 /var/log/wo/wordops.log
|
- sudo bash -c 'nginx -T 2>&1 > /var/log/wo/nginx.log 2>&1' || sudo tail -n50 /var/log/wo/wordops.log
|
||||||
- sudo bash -c 'tar -I pigz -cf wordops.tar.gz /var/log/wo'
|
- sudo bash -c 'tar -I pigz -cf wordops.tar.gz /var/log/wo'
|
||||||
- sudo curl --progress-bar --upload-file "wordops.tar.gz" https://transfer.sh/$(basename wordops.tar.gz) && echo ""
|
- sudo curl --progress-bar --upload-file "wordops.tar.gz" https://transfer.sh/$(basename wordops.tar.gz) && echo "" || sudo echo "transfer.sh is down"
|
||||||
|
|||||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
|||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2018-2019 WordOps
|
Copyright (c) 2018-2019 WordOps (https://wordops.io)
|
||||||
Copyright (C) 2011-2017 EE Development Group (https://github.com/ee/ee/contributors)
|
Copyright (C) 2011-2017 EE Development Group (https://github.com/ee/ee/contributors)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<h1 align="center" style="font-size:54px;"><a href="https://wordops.org">
|
<h1 align="center" style="font-size:54px;"><a href="https://wordops.io">
|
||||||
WordOps</a>
|
WordOps</a>
|
||||||
<br>
|
<br>
|
||||||
</h1>
|
</h1>
|
||||||
@@ -151,4 +151,4 @@ If you'd like to contribute, please fork the repository and make changes as you'
|
|||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
- [MIT](http://opensource.org/licenses/MIT) © [WordOps](https://wordops.org)
|
- [MIT](http://opensource.org/licenses/MIT) © [WordOps](https://wordops.io)
|
||||||
|
|||||||
6
install
6
install
@@ -2,7 +2,7 @@
|
|||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
# WordOps install and update script
|
# WordOps install and update script
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
# Website: https://wordops.org
|
# Website: https://wordops.io
|
||||||
# GitHub: https://github.com/WordOps/WordOps
|
# GitHub: https://github.com/WordOps/WordOps
|
||||||
# Copyright (c) 2019 - WordOps
|
# Copyright (c) 2019 - WordOps
|
||||||
# This script is licensed under M.I.T
|
# This script is licensed under M.I.T
|
||||||
@@ -613,7 +613,7 @@ if [ "$migration" -eq "1" ]; then
|
|||||||
wo_lib_echo_info "For autocompletion, run the following command:"
|
wo_lib_echo_info "For autocompletion, run the following command:"
|
||||||
wo_lib_echo_info "source /etc/bash_completion.d/wo_auto.rc"
|
wo_lib_echo_info "source /etc/bash_completion.d/wo_auto.rc"
|
||||||
echo
|
echo
|
||||||
wo_lib_echo "WordOps (wo) help: https://wordops.org/docs"
|
wo_lib_echo "WordOps (wo) help: https://wordops.io/docs"
|
||||||
else
|
else
|
||||||
echo
|
echo
|
||||||
wo_lib_echo "For WordOps (wo) auto completion, run the following command"
|
wo_lib_echo "For WordOps (wo) auto completion, run the following command"
|
||||||
@@ -621,5 +621,5 @@ else
|
|||||||
wo_lib_echo_info "source /etc/bash_completion.d/wo_auto.rc"
|
wo_lib_echo_info "source /etc/bash_completion.d/wo_auto.rc"
|
||||||
echo
|
echo
|
||||||
wo_lib_echo "Yay! WordOps (wo) installed/updated successfully"
|
wo_lib_echo "Yay! WordOps (wo) installed/updated successfully"
|
||||||
wo_lib_echo "WordOps (wo) help: https://wordops.org/docs"
|
wo_lib_echo "WordOps (wo) help: https://wordops.io/docs"
|
||||||
fi
|
fi
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -64,7 +64,7 @@ setup(name='wo',
|
|||||||
classifiers=[],
|
classifiers=[],
|
||||||
keywords='',
|
keywords='',
|
||||||
author='WordOps',
|
author='WordOps',
|
||||||
author_email='core@wordops.org',
|
author_email='core@wordops.io',
|
||||||
url='https://wordops.io',
|
url='https://wordops.io',
|
||||||
license='MIT',
|
license='MIT',
|
||||||
packages=find_packages(exclude=['ez_setup', 'examples', 'tests',
|
packages=find_packages(exclude=['ez_setup', 'examples', 'tests',
|
||||||
|
|||||||
@@ -1252,7 +1252,7 @@ def setupLetsEncrypt(self, wo_domain_name):
|
|||||||
"ssl_certificate_key {0}/{1}/key.pem;\n"
|
"ssl_certificate_key {0}/{1}/key.pem;\n"
|
||||||
.format(WOVariables.wo_ssl_live, wo_domain_name))
|
.format(WOVariables.wo_ssl_live, wo_domain_name))
|
||||||
sslconf.close()
|
sslconf.close()
|
||||||
# updateSiteInfo(self, wo_domain_name, ssl=True)
|
updateSiteInfo(self, wo_domain_name, ssl=True)
|
||||||
|
|
||||||
WOGit.add(self, ["/etc/letsencrypt"],
|
WOGit.add(self, ["/etc/letsencrypt"],
|
||||||
msg="Adding letsencrypt folder")
|
msg="Adding letsencrypt folder")
|
||||||
@@ -1368,7 +1368,7 @@ def renewLetsEncrypt(self, wo_domain_name):
|
|||||||
# "\nPlease check the WordOps log for reason
|
# "\nPlease check the WordOps log for reason
|
||||||
# The current expiry date is : " +
|
# The current expiry date is : " +
|
||||||
# str(SSL.getExpirationDate(self, wo_domain_name)) +
|
# str(SSL.getExpirationDate(self, wo_domain_name)) +
|
||||||
# "\n\nFor support visit https://wordops.org/support .
|
# "\n\nFor support visit https://wordops.io/support .
|
||||||
# \n\nBest regards,\nYour WordOps Worker", files=mail_list,
|
# \n\nBest regards,\nYour WordOps Worker", files=mail_list,
|
||||||
# port=25, isTls=False)
|
# port=25, isTls=False)
|
||||||
Log.error(self, "Check the WO log for more details "
|
Log.error(self, "Check the WO log for more details "
|
||||||
@@ -1466,6 +1466,8 @@ def archivedCertificateHandle(self, domain):
|
|||||||
.format(WOVariables.wo_ssl_live, domain))
|
.format(WOVariables.wo_ssl_live, domain))
|
||||||
if ssl:
|
if ssl:
|
||||||
|
|
||||||
|
try:
|
||||||
|
|
||||||
if not os.path.isfile("/var/www/{0}/conf/nginx/ssl.conf"
|
if not os.path.isfile("/var/www/{0}/conf/nginx/ssl.conf"
|
||||||
.format(domain)):
|
.format(domain)):
|
||||||
Log.info(
|
Log.info(
|
||||||
@@ -1483,7 +1485,12 @@ def archivedCertificateHandle(self, domain):
|
|||||||
.format(WOVariables.wo_ssl_live, domain))
|
.format(WOVariables.wo_ssl_live, domain))
|
||||||
sslconf.close()
|
sslconf.close()
|
||||||
|
|
||||||
ssl = True
|
updateSiteInfo(self, domain, ssl=True)
|
||||||
|
|
||||||
|
except IOError as e:
|
||||||
|
Log.debug(self, str(e))
|
||||||
|
Log.debug(self, "Error occured while generating "
|
||||||
|
"ssl.conf")
|
||||||
|
|
||||||
elif (check_prompt == "2"):
|
elif (check_prompt == "2"):
|
||||||
Log.info(self, "Using Existing Certificate files")
|
Log.info(self, "Using Existing Certificate files")
|
||||||
@@ -1493,7 +1500,8 @@ def archivedCertificateHandle(self, domain):
|
|||||||
"Please check if following file exist"
|
"Please check if following file exist"
|
||||||
"\n\t/etc/letsencrypt/live/{0}/fullchain.pem\n\t"
|
"\n\t/etc/letsencrypt/live/{0}/fullchain.pem\n\t"
|
||||||
"/etc/letsencrypt/live/{0}/key.pem".format(domain))
|
"/etc/letsencrypt/live/{0}/key.pem".format(domain))
|
||||||
ssl = True
|
|
||||||
|
updateSiteInfo(self, domain, ssl=True)
|
||||||
|
|
||||||
elif (check_prompt == "3"):
|
elif (check_prompt == "3"):
|
||||||
Log.info(self, "Please wait while we renew the Let's Encrypt"
|
Log.info(self, "Please wait while we renew the Let's Encrypt"
|
||||||
@@ -1506,6 +1514,28 @@ def archivedCertificateHandle(self, domain):
|
|||||||
"--force"
|
"--force"
|
||||||
.format(domain))
|
.format(domain))
|
||||||
|
|
||||||
|
if issuessl:
|
||||||
|
|
||||||
|
try:
|
||||||
|
|
||||||
|
WOShellExec.cmd_exec(self, "mkdir -p {0}/{1} && "
|
||||||
|
"/etc/letsencrypt/acme.sh "
|
||||||
|
"--config-home "
|
||||||
|
"'/etc/letsencrypt/config' "
|
||||||
|
"--install-cert -d {1} --ecc "
|
||||||
|
"--cert-file {0}/{1}/cert.pem "
|
||||||
|
"--key-file {0}/{1}/key.pem "
|
||||||
|
"--fullchain-file "
|
||||||
|
"{0}/{1}/fullchain.pem "
|
||||||
|
"--reloadcmd "
|
||||||
|
"\"service nginx restart\" "
|
||||||
|
.format(WOVariables.wo_ssl_live, domain))
|
||||||
|
|
||||||
|
except IOError as e:
|
||||||
|
Log.debug(self, str(e))
|
||||||
|
Log.debug(self, "Error occured while installing "
|
||||||
|
"the certificate")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
Log.error(self, "Operation cancelled by user.")
|
Log.error(self, "Operation cancelled by user.")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user