Skip to content

Commit 0a0b114

Browse files
committed
Update index.py
1 parent 7c444b3 commit 0a0b114

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

plugins/doh/index.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,13 @@ def getInitdConf():
7070
path = getServerDir() + "/init.d/doh"
7171
return path
7272

73-
74-
def getConf():
75-
path = getServerDir() + "/custom/conf/app.ini"
76-
7773
if not os.path.exists(path):
7874
return mw.returnJson(False, "请先安装初始化!<br/>默认地址:http://" + mw.getLocalIp() + ":3000")
7975
return path
8076

8177

8278
def getConfTpl():
83-
path = getPluginDir() + "/conf/app.ini"
79+
path = getPluginDir() + "/config/config.toml"
8480
return path
8581

8682

@@ -133,6 +129,12 @@ def initDreplace():
133129
service_path = mw.getServerDir()
134130

135131

132+
conf_tpl = getConfTpl()
133+
content = mw.readFile(conf_tpl)
134+
conf_toml = getServerDir() + '/config.toml'
135+
mw.writeFile(conf_toml, content)
136+
137+
136138
initD_path = getServerDir() + '/init.d'
137139
if not os.path.exists(initD_path):
138140
os.mkdir(initD_path)

0 commit comments

Comments
 (0)