|
|
@ -15,11 +15,11 @@ class SSL: |
|
|
|
"`tail /var/log/ee/ee.log` & Try Again!!!") |
|
|
|
|
|
|
|
|
|
|
|
current_date = EEShellExec.cmd_exec(self, "date -d \"now\" +%s") |
|
|
|
expiration_date = EEShellExec.cmd_exec(self, "date -d \"\`openssl x509 -in /etc/letsencrypt/live/{0}/cert.pem" |
|
|
|
current_date = EEShellExec.cmd_exec_stdout(self, "date -d \"now\" +%s") |
|
|
|
expiration_date = EEShellExec.cmd_exec_stdout(self, "date -d \"`openssl x509 -in /etc/letsencrypt/live/{0}/cert.pem" |
|
|
|
" -text -noout|grep \"Not After\"|cut -c 25-`\" +%s".format(domain)) |
|
|
|
|
|
|
|
days_left = (current_date - expiration_date)*0.000011574 |
|
|
|
days_left = int((int(expiration_date) - int(current_date))/ 86400) |
|
|
|
if (days_left > 0): |
|
|
|
return days_left |
|
|
|
else: |
|
|
@ -35,7 +35,7 @@ class SSL: |
|
|
|
Log.error(self, "Check logs for reason " |
|
|
|
"`tail /var/log/ee/ee.log` & Try Again!!!") |
|
|
|
|
|
|
|
expiration_date = EEShellExec.cmd_exec(self, "date -d \"\`openssl x509 -in /etc/letsencrypt/live/{0}/cert.pem" |
|
|
|
expiration_date = EEShellExec.cmd_exec_stdout(self, "date -d \"`openssl x509 -in /etc/letsencrypt/live/{0}/cert.pem" |
|
|
|
" -text -noout|grep \"Not After\"|cut -c 25-`\" ".format(domain)) |
|
|
|
return expiration_date |
|
|
|
|
|
|
|