From 3ae2f0db68b5337a22f2d55a0f6d23a430ab0f1a Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 13 Jul 2022 11:03:32 +0800 Subject: [PATCH] Update index.py --- plugins/mariadb/index.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/mariadb/index.py b/plugins/mariadb/index.py index a848e4924..27201a517 100755 --- a/plugins/mariadb/index.py +++ b/plugins/mariadb/index.py @@ -122,7 +122,6 @@ def pSqliteDb(dbname='databases'): def pMysqlDb(): db = orm.ORM() - db.__DB_CNF = getConf() db.setDbConf(getConf()) db.setPwd(pSqliteDb('config').where( 'id=?', (1,)).getField('mysql_root')) @@ -176,11 +175,13 @@ def initDreplace(version=''): def status(version=''): - pid = getPidFile() - if not os.path.exists(pid): + try: + pid = getPidFile() + if os.path.exists(pid): + return 'start' + except Exception as e: return 'stop' - - return 'start' + return 'stop' def getDataDir():