Update index.py

This commit is contained in:
midoks
2023-09-29 22:58:20 +08:00
parent 20d85d0bd7
commit d50936349c
+3 -3
View File
@@ -104,7 +104,7 @@ def initDreplace():
mw.execShell('chmod +x ' + file_bin)
# config replace
dst_conf = getServerDir() + '/redis.conf'
dst_conf = getServerDir() + '/' + getPluginName() + '.conf'
dst_conf_init = getServerDir() + '/init.pl'
if not os.path.exists(dst_conf_init):
conf_content = mw.readFile(getConfTpl())
@@ -117,9 +117,9 @@ def initDreplace():
# systemd
systemDir = mw.systemdCfgDir()
systemService = systemDir + '/redis.service'
systemService = systemDir + '/' + getPluginName() + '.service'
if os.path.exists(systemDir) and not os.path.exists(systemService):
systemServiceTpl = getPluginDir() + '/init.d/redis.service.tpl'
systemServiceTpl = getPluginDir() + '/init.d/' + getPluginName() + '.service.tpl'
service_path = mw.getServerDir()
se_content = mw.readFile(systemServiceTpl)
se_content = se_content.replace('{$SERVER_PATH}', service_path)