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