Update index.py

This commit is contained in:
midoks
2022-08-10 22:01:46 +08:00
parent da4c8750fc
commit 1a8e643c10
+6 -1
View File
@@ -276,7 +276,12 @@ def initPgPwd():
data = mw.execShell(cmd_pass)
cmd_pass = "echo \"alter user postgres with password '" + pwd + "'\" | "
cmd_pass = cmd_pass + serverdir + '/bin/psql -d postgres'
if not mw.isAppleSystem():
cmd_pass = cmd_pass + ' su - postgres -c "' + \
serverdir + '/bin/psql" -d postgres'
else:
cmd_pass = cmd_pass + serverdir + '/bin/psql -d postgres'
data = mw.execShell(cmd_pass)
# print(cmd_pass)
# print(data)