Fix display message
This commit is contained in:
@@ -359,7 +359,6 @@ def post_pref(self, apt_packages, packages, upgrade=False):
|
||||
WOTemplate.render(self,
|
||||
'/etc/nginx/sites-available/22222',
|
||||
'22222.mustache', data, overwrite=False)
|
||||
|
||||
passwd = ''.join([random.choice
|
||||
(string.ascii_letters + string.digits)
|
||||
for n in range(24)])
|
||||
@@ -468,23 +467,23 @@ def post_pref(self, apt_packages, packages, upgrade=False):
|
||||
"/var/www/22222/cert/22222.key;\n")
|
||||
server_ip = requests.get('http://v4.wordops.eu')
|
||||
|
||||
if set(["nginx"]).issubset(set(apt_packages)):
|
||||
print("WordOps backend configuration was successful\n"
|
||||
"You can access it on : https://{0}:22222"
|
||||
.format(server_ip))
|
||||
print("HTTP Auth User Name: WordOps" +
|
||||
"\nHTTP Auth Password : {0}".format(passwd))
|
||||
WOService.reload_service(self, 'nginx')
|
||||
else:
|
||||
self.msg = (self.msg + ["HTTP Auth User "
|
||||
"Name: WordOps"] +
|
||||
["HTTP Auth Password : {0}"
|
||||
.format(passwd)])
|
||||
self.msg = (self.msg + ["WordOps backend is available "
|
||||
"on https://{0}:22222 "
|
||||
"or https://{1}:22222"
|
||||
.format(server_ip.text,
|
||||
WOVariables.wo_fqdn)])
|
||||
if set(["nginx"]).issubset(set(apt_packages)):
|
||||
print("WordOps backend configuration was successful\n"
|
||||
"You can access it on : https://{0}:22222"
|
||||
.format(server_ip))
|
||||
print("HTTP Auth User Name: WordOps" +
|
||||
"\nHTTP Auth Password : {0}".format(passwd))
|
||||
WOService.reload_service(self, 'nginx')
|
||||
else:
|
||||
self.msg = (self.msg + ["HTTP Auth User "
|
||||
"Name: WordOps"] +
|
||||
["HTTP Auth Password : {0}"
|
||||
.format(passwd)])
|
||||
self.msg = (self.msg + ["WordOps backend is available "
|
||||
"on https://{0}:22222 "
|
||||
"or https://{1}:22222"
|
||||
.format(server_ip.text,
|
||||
WOVariables.wo_fqdn)])
|
||||
|
||||
if not os.path.isfile("/opt/cf-update.sh"):
|
||||
WOTemplate.render(self, '/opt/cf-update.sh',
|
||||
|
||||
Reference in New Issue
Block a user