From 507820d25e7d299593b7f47d7cc77538a893d093 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Mon, 3 Feb 2025 01:31:31 +0800 Subject: [PATCH] Update index.py --- plugins/ldap/index.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/ldap/index.py b/plugins/ldap/index.py index 9c65a1a58..64e267b1e 100755 --- a/plugins/ldap/index.py +++ b/plugins/ldap/index.py @@ -48,7 +48,7 @@ def getConf(): def getConfTpl(): - path = getPluginDir() + "/config/redis.conf" + path = getPluginDir() + "/config/ldap.conf" return path @@ -128,6 +128,13 @@ def contentReplace(content): def initDreplace(): service_path = mw.getServerDir() + + conf = getConf() + conf_tpl = getConfTpl() + if not os.path.exists(conf): + content = mw.readFile(conf_tpl) + content = contentReplace(content) + mw.writeFile(conf, content) return True