Refactor -le=renew
This commit is contained in:
@@ -132,6 +132,17 @@ class WOAcme:
|
||||
"ssl.conf")
|
||||
return 0
|
||||
|
||||
def renew(self, domain):
|
||||
"""Renew letsencrypt certificate with acme.sh"""
|
||||
try:
|
||||
WOShellExec.cmd_exec(
|
||||
self, "{0} ".format(WOAcme.wo_acme_exec) +
|
||||
"--renew -d {0} --ecc --force".format(domain))
|
||||
except CommandExecutionError as e:
|
||||
Log.debug(self, str(e))
|
||||
Log.error(self, 'Unable to renew certificate')
|
||||
return True
|
||||
|
||||
def check_dns(self, acme_domains):
|
||||
"""Check if a list of domains point to the server IP"""
|
||||
server_ip = requests.get('http://v4.wordops.eu/').text
|
||||
|
||||
@@ -44,7 +44,7 @@ class Log:
|
||||
"""
|
||||
Logs debug messages into log file
|
||||
"""
|
||||
self.app.log.debug(Log.HEADER + msg + Log.ENDC + __name__)
|
||||
self.app.log.debug(Log.HEADER + msg + Log.ENDC)
|
||||
|
||||
def wait(self, msg, end='\r', log=True):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user