|
|
@ -122,7 +122,6 @@ def pSqliteDb(dbname='databases'): |
|
|
|
|
|
|
|
|
|
|
|
def pMysqlDb(): |
|
|
|
def pMysqlDb(): |
|
|
|
db = orm.ORM() |
|
|
|
db = orm.ORM() |
|
|
|
db.__DB_CNF = getConf() |
|
|
|
|
|
|
|
db.setDbConf(getConf()) |
|
|
|
db.setDbConf(getConf()) |
|
|
|
db.setPwd(pSqliteDb('config').where( |
|
|
|
db.setPwd(pSqliteDb('config').where( |
|
|
|
'id=?', (1,)).getField('mysql_root')) |
|
|
|
'id=?', (1,)).getField('mysql_root')) |
|
|
@ -176,11 +175,13 @@ def initDreplace(version=''): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def status(version=''): |
|
|
|
def status(version=''): |
|
|
|
pid = getPidFile() |
|
|
|
try: |
|
|
|
if not os.path.exists(pid): |
|
|
|
pid = getPidFile() |
|
|
|
|
|
|
|
if os.path.exists(pid): |
|
|
|
|
|
|
|
return 'start' |
|
|
|
|
|
|
|
except Exception as e: |
|
|
|
return 'stop' |
|
|
|
return 'stop' |
|
|
|
|
|
|
|
return 'stop' |
|
|
|
return 'start' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getDataDir(): |
|
|
|
def getDataDir(): |
|
|
|