diff --git a/install b/install index ec5eb49..06a3274 100755 --- a/install +++ b/install @@ -903,7 +903,6 @@ else echo wo_lib_echo "WordOps Documentation : https://docs.wordops.net" wo_lib_echo "WordOps Community Forum : https://community.wordops.net" - wo_lib_echo "WordOps Community Chat : https://chat.wordops.net" echo wo_lib_echo "Give WordOps a GitHub star : https://github.com/WordOps/WordOps/" echo diff --git a/wo/core/acme.py b/wo/core/acme.py index a49d2ba..0c0c11d 100644 --- a/wo/core/acme.py +++ b/wo/core/acme.py @@ -1,8 +1,6 @@ import csv import os -import requests - from wo.core.fileutils import WOFileUtils from wo.core.git import WOGit from wo.core.logging import Log @@ -55,10 +53,9 @@ class WOAcme: WOAcme.check_acme(self) acme_list = WOShellExec.cmd_exec_stdout( self, "{0} ".format(WOAcme.wo_acme_exec) + - "--list --listraw") + "--list --listraw", log=False) if acme_list: - WOFileUtils.textwrite(self, '/var/lib/wo/cert.csv', acme_list) - WOFileUtils.chmod(self, '/var/lib/wo/cert.csv', 0o600) + WOFileUtils.textwrite(self, '/var/lib/wo/cert.csv', acme_list, perm="0o600") else: Log.error(self, "Unable to export certs list") @@ -94,7 +91,7 @@ class WOAcme: if not WOShellExec.cmd_exec( self, "{0} ".format(WOAcme.wo_acme_exec) + "--issue -d '{0}' {1} -k {2} -f" - .format(all_domains, acme_mode, keylenght)): + .format(all_domains, acme_mode, keylenght), log=False): Log.failed(self, "Issuing SSL cert with acme.sh") if acmedata['dns'] is True: Log.error( @@ -174,7 +171,7 @@ class WOAcme: try: WOShellExec.cmd_exec( self, "{0} ".format(WOAcme.wo_acme_exec) + - "--renew -d {0} --ecc --force".format(domain)) + "--renew -d {0} --ecc --force".format(domain), log=False) except CommandExecutionError as e: Log.debug(self, str(e)) Log.error(self, 'Unable to renew certificate') diff --git a/wo/core/fileutils.py b/wo/core/fileutils.py index 92d45bf..c4c04aa 100644 --- a/wo/core/fileutils.py +++ b/wo/core/fileutils.py @@ -342,14 +342,14 @@ class WOFileUtils(): continue return True - def textwrite(self, path, content): + def textwrite(self, path, content, perm="0o644"): """ Write content into a file """ Log.debug(self, "Writing content in {0}".format(path)) try: - with open("{0}".format(path), - encoding='utf-8', mode='w') as final_file: + with os.fdopen(os.open(path, os.O_WRONLY | os.O_CREAT, perm), + 'w', encoding='utf-8') as final_file: final_file.write('{0}'.format(content)) except IOError as e: Log.debug(self, "{0}".format(e))