Another fix for stack_pref
This commit is contained in:
@@ -1,22 +1,16 @@
|
|||||||
import codecs
|
import codecs
|
||||||
import configparser
|
import configparser
|
||||||
import os
|
import os
|
||||||
import pwd
|
|
||||||
import random
|
import random
|
||||||
import shutil
|
import shutil
|
||||||
import string
|
import string
|
||||||
import re
|
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
import psutil
|
|
||||||
from wo.cli.plugins.site_functions import *
|
from wo.cli.plugins.site_functions import *
|
||||||
from wo.cli.plugins.sitedb import *
|
|
||||||
from wo.cli.plugins.stack_services import WOStackStatusController
|
from wo.cli.plugins.stack_services import WOStackStatusController
|
||||||
from wo.core.addswap import WOSwap
|
|
||||||
from wo.core.apt_repo import WORepo
|
from wo.core.apt_repo import WORepo
|
||||||
from wo.core.aptget import WOAptGet
|
from wo.core.aptget import WOAptGet
|
||||||
from wo.core.cron import WOCron
|
from wo.core.cron import WOCron
|
||||||
from wo.core.download import WODownload
|
|
||||||
from wo.core.extract import WOExtract
|
from wo.core.extract import WOExtract
|
||||||
from wo.core.fileutils import WOFileUtils
|
from wo.core.fileutils import WOFileUtils
|
||||||
from wo.core.git import WOGit
|
from wo.core.git import WOGit
|
||||||
@@ -530,23 +524,23 @@ def post_pref(self, apt_packages, packages):
|
|||||||
["/etc/nginx"], msg="Adding Nginx into Git")
|
["/etc/nginx"], msg="Adding Nginx into Git")
|
||||||
WOService.reload_service(self, 'nginx')
|
WOService.reload_service(self, 'nginx')
|
||||||
|
|
||||||
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)])
|
||||||
else:
|
else:
|
||||||
WOService.restart_service(self, 'nginx')
|
WOService.restart_service(self, 'nginx')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user