Update index.py

pull/701/head
Mr Chen 3 months ago
parent 35e08295ce
commit 507820d25e
  1. 9
      plugins/ldap/index.py

@ -48,7 +48,7 @@ def getConf():
def getConfTpl(): def getConfTpl():
path = getPluginDir() + "/config/redis.conf" path = getPluginDir() + "/config/ldap.conf"
return path return path
@ -128,6 +128,13 @@ def contentReplace(content):
def initDreplace(): def initDreplace():
service_path = mw.getServerDir() 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 return True

Loading…
Cancel
Save