mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-20 08:25:50 +08:00
Update index.py
This commit is contained in:
@@ -43,7 +43,7 @@ def getConf():
|
||||
|
||||
|
||||
def getConfTpl():
|
||||
path = getPluginDir() + "/config/redis.conf"
|
||||
path = getPluginDir() + "/config/mosquitto.conf"
|
||||
return path
|
||||
|
||||
|
||||
@@ -104,13 +104,11 @@ def initDreplace():
|
||||
mw.execShell('chmod +x ' + file_bin)
|
||||
|
||||
# config replace
|
||||
dst_conf = getServerDir() + '/' + getPluginName() + '.conf'
|
||||
dst_conf = getServerDir() + '/etc/mosquitto/' + getPluginName() + '.conf'
|
||||
dst_conf_init = getServerDir() + '/init.pl'
|
||||
if not os.path.exists(dst_conf_init):
|
||||
conf_content = mw.readFile(getConfTpl())
|
||||
conf_content = conf_content.replace('{$SERVER_PATH}', service_path)
|
||||
conf_content = conf_content.replace(
|
||||
'{$REDIS_PASS}', mw.getRandomString(10))
|
||||
|
||||
mw.writeFile(dst_conf, conf_content)
|
||||
mw.writeFile(dst_conf_init, 'ok')
|
||||
|
||||
Reference in New Issue
Block a user