From 1329a87a0671a6050d133311b7cd455f142bd0e7 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Mon, 10 Jun 2024 00:42:16 +0800 Subject: [PATCH] Update index.py --- plugins/mysql-apt/index.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/mysql-apt/index.py b/plugins/mysql-apt/index.py index 56695560d..c0592a90f 100755 --- a/plugins/mysql-apt/index.py +++ b/plugins/mysql-apt/index.py @@ -98,6 +98,12 @@ def getDbPort(): tmp = re.search(rep, content) return tmp.groups()[0].strip() +def getDbServerId(): + file = getConf() + content = mw.readFile(file) + rep = 'server-id\s*=\s*(.*)' + tmp = re.search(rep, content) + return tmp.groups()[0].strip() def getSocketFile(): file = getConf()