Improve logging
This commit is contained in:
@@ -86,12 +86,12 @@ class WOSecureController(CementBaseController):
|
||||
while not pargs.user_input.isdigit():
|
||||
Log.info(self, "Please enter a valid port number ")
|
||||
pargs.user_input = input("WordOps "
|
||||
"admin port [22222]:")
|
||||
"admin port [22222]:")
|
||||
if not pargs.user_input:
|
||||
port = input("WordOps admin port [22222]:")
|
||||
if port == "":
|
||||
pargs.user_input = 22222
|
||||
while not port.isdigit() and port != "":
|
||||
while (not port.isdigit()) and (port != "") and (not port < 65556):
|
||||
Log.info(self, "Please Enter valid port number :")
|
||||
port = input("WordOps admin port [22222]:")
|
||||
pargs.user_input = port
|
||||
|
||||
@@ -7,6 +7,7 @@ from subprocess import Popen
|
||||
|
||||
from cement.core import handler, hook
|
||||
from cement.core.controller import CementBaseController, expose
|
||||
|
||||
from wo.cli.plugins.site_functions import *
|
||||
from wo.cli.plugins.sitedb import (addNewSite, deleteSiteInfo, getAllsites,
|
||||
getSiteInfo, updateSiteInfo)
|
||||
|
||||
@@ -9,11 +9,11 @@ import re
|
||||
import shutil
|
||||
import string
|
||||
|
||||
import requests
|
||||
|
||||
import psutil
|
||||
import requests
|
||||
from cement.core import handler, hook
|
||||
from cement.core.controller import CementBaseController, expose
|
||||
|
||||
from wo.cli.plugins.site_functions import *
|
||||
from wo.cli.plugins.sitedb import *
|
||||
from wo.cli.plugins.stack_migrate import WOStackMigrateController
|
||||
|
||||
@@ -3,6 +3,7 @@ import os
|
||||
|
||||
from cement.core import handler, hook
|
||||
from cement.core.controller import CementBaseController, expose
|
||||
|
||||
from wo.core.apt_repo import WORepo
|
||||
from wo.core.aptget import WOAptGet
|
||||
from wo.core.logging import Log
|
||||
@@ -28,6 +29,17 @@ class WOStackMigrateController(CementBaseController):
|
||||
# Backup all database
|
||||
WOMysql.backupAll(self)
|
||||
|
||||
if not WOVariables.wo_distro == 'raspbian':
|
||||
if (not WOVariables.wo_platform_codename == 'jessie'):
|
||||
wo_mysql = ["mariadb-server", "percona-toolkit",
|
||||
"python3-mysqldb", "mariadb-backup"]
|
||||
else:
|
||||
wo_mysql = ["mariadb-server", "percona-toolkit",
|
||||
"python3-mysql.connector"]
|
||||
else:
|
||||
wo_mysql = ["mariadb-server", "percona-toolkit",
|
||||
"python3-mysqldb"]
|
||||
|
||||
# Add MariaDB repo
|
||||
Log.info(self, "Adding repository for MariaDB, please wait...")
|
||||
|
||||
@@ -78,7 +90,7 @@ class WOStackMigrateController(CementBaseController):
|
||||
log=False)
|
||||
|
||||
# Install MariaDB
|
||||
apt_packages = ["mariadb-server"]
|
||||
apt_packages = wo_mysql
|
||||
|
||||
Log.info(self, "Updating apt-cache, hang on...")
|
||||
WOAptGet.update(self)
|
||||
|
||||
Reference in New Issue
Block a user