Fix small issues

This commit is contained in:
VirtuBox
2019-09-02 22:24:46 +02:00
parent 242b4c4666
commit 84ce672a5b
3 changed files with 5 additions and 9 deletions

View File

@@ -79,8 +79,7 @@ class WOSiteController(CementBaseController):
Log.error(self, "service nginx reload failed. " Log.error(self, "service nginx reload failed. "
"check issues with `nginx -t` command") "check issues with `nginx -t` command")
else: else:
Log.error(self, "nginx configuration file does not exist" Log.error(self, "nginx configuration file does not exist")
.format(wo_domain))
@expose(help="Disable site example.com") @expose(help="Disable site example.com")
def disable(self): def disable(self):
@@ -121,8 +120,7 @@ class WOSiteController(CementBaseController):
Log.error(self, "service nginx reload failed. " Log.error(self, "service nginx reload failed. "
"check issues with `nginx -t` command") "check issues with `nginx -t` command")
else: else:
Log.error(self, "nginx configuration file does not exist" Log.error(self, "nginx configuration file does not exist")
.format(wo_domain))
@expose(help="Get example.com information") @expose(help="Get example.com information")
def info(self): def info(self):
@@ -182,8 +180,7 @@ class WOSiteController(CementBaseController):
"disabled")) "disabled"))
self.app.render((data), 'siteinfo.mustache') self.app.render((data), 'siteinfo.mustache')
else: else:
Log.error(self, "nginx configuration file does not exist" Log.error(self, "nginx configuration file does not exist")
.format(wo_domain))
@expose(help="Monitor example.com logs") @expose(help="Monitor example.com logs")
def log(self): def log(self):

View File

@@ -1447,8 +1447,7 @@ def setupLetsEncrypt(self, wo_domain_name, subdomain=False, wildcard=False,
'/etc/letsencrypt'): '/etc/letsencrypt'):
Log.info(self, "Securing WordOps backend with {0} certificate" Log.info(self, "Securing WordOps backend with {0} certificate"
.format(wo_domain_name)) .format(wo_domain_name))
sslconf = open("/var/www/22222/conf/nginx/ssl.conf" sslconf = open("/var/www/22222/conf/nginx/ssl.conf",
.format(wo_domain_name),
encoding='utf-8', mode='w') encoding='utf-8', mode='w')
sslconf.write("ssl_certificate {0}/{1}/fullchain.pem;\n" sslconf.write("ssl_certificate {0}/{1}/fullchain.pem;\n"
"ssl_certificate_key {0}/{1}/key.pem;\n" "ssl_certificate_key {0}/{1}/key.pem;\n"

View File

@@ -73,7 +73,7 @@ def pre_pref(self, apt_packages):
log=False) log=False)
except CommandExecutionError as e: except CommandExecutionError as e:
Log.debug(self, "{0}".format(e)) Log.debug(self, "{0}".format(e))
Log.error("Failed to initialize MySQL package") Log.error(self, "Failed to initialize MySQL package")
Log.debug(self, "echo \"mariadb-server-{0} " Log.debug(self, "echo \"mariadb-server-{0} "
"mysql-server/root_password_again " "mysql-server/root_password_again "