Skip to content

Commit

Permalink
Update index.py
Browse files Browse the repository at this point in the history
  • Loading branch information
midoks committed Oct 1, 2024
1 parent 1aedb66 commit f09017f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/pgadmin/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit f09017f

Please sign in to comment.