Browse Source

added ssl status

develop
Prabuddha Chakraborty 9 years ago
parent
commit
7521056c84
  1. 6
      ee/cli/plugins/site.py
  2. 4
      ee/core/sslutils.py

6
ee/cli/plugins/site.py

@ -156,11 +156,15 @@ class EESiteController(CementBaseController):
ee_site_webroot = ''
pagespeed = ("enabled" if siteinfo.is_pagespeed else "disabled")
ssl = ("enabled" if siteinfo.is_ssl else "disabled")
if (ssl == "enabled"):
sslprovider = "Lets Encrypt"
sslexpiry = str(SSL.getExpirationDate(self,ee_domain))
data = dict(domain=ee_domain, webroot=ee_site_webroot,
accesslog=access_log, errorlog=error_log,
dbname=ee_db_name, dbuser=ee_db_user,
dbpass=ee_db_pass, hhvm=hhvm, pagespeed=pagespeed,
ssl=ssl, sslprovider=sslprovider, sslexpiry= sslexpiry,
type=sitetype + " " + cachetype + " ({0})"
.format("enabled" if siteinfo.is_enabled else
"disabled"))

4
ee/core/sslutils.py

@ -29,9 +29,9 @@ class SSL:
def getExpirationDate(self,domain):
# check if exist
if not os.path.isfile('/etc/letsencrypt/live/{0}/cert.pem'
.format(domain),False):
.format(domain)):
Log.error(self,'File Not Found : /etc/letsencrypt/live/{0}/cert.pem'
.format(domain))
.format(domain),False)
Log.error(self, "Check logs for reason "
"`tail /var/log/ee/ee.log` & Try Again!!!")

Loading…
Cancel
Save