Update index.py

This commit is contained in:
Mr Chen
2024-10-02 02:58:12 +08:00
parent 1aedb66132
commit f09017fe6e
+3 -3
View File
@@ -191,14 +191,14 @@ def initReplace():
content = contentReplace(content)
mw.writeFile(file_run, content)
pma_path = getServerDir() + '/pg.pass'
if not os.path.exists(pma_path):
pass_path = getServerDir() + '/pg.pass'
if not os.path.exists(pass_path):
username = mw.getRandomString(8)
password = mw.getRandomString(10)
pass_cmd = username + ':' + mw.hasPwd(password)
setCfg('username', username)
setCfg('password', password)
mw.writeFile(pma_path, pass_cmd)
mw.writeFile(pass_path, pass_cmd)
judge_file = getServerDir()+'/data/pgadmin4/pgadmin4.db'
if not os.path.exists(judge_file):