Update index.py

This commit is contained in:
2026-11-04 10:11:25 +08:00
parent c1380945ef
commit 84b94a172e

View File

@@ -253,7 +253,6 @@ def initDreplace(version=''):
mw.execShell('chmod +x ' + file_bin)
return file_bin
def status_proccess(version=''):
data = mw.execShell(
"ps -ef|grep bin/postgres |grep -v grep | grep -v python | grep -v mdserver-web | awk '{print $2}'")
@@ -267,15 +266,12 @@ def status(version=''):
return 'start'
return 'stop'
def pgCmd(cmd):
return "su - postgres -c \"" + cmd + "\""
def execShellPg(cmd):
return mw.execShell(pgCmd(cmd))
def pGetDbUser():
if mw.isAppleSystem():
user = mw.execShell(
@@ -283,7 +279,6 @@ def pGetDbUser():
return user
return 'postgresql'
def initPgData():
serverdir = getServerDir()
if not os.path.exists(serverdir + '/data'):
@@ -295,7 +290,6 @@ def initPgData():
return False
return True
def initPgPwd():
serverdir = getServerDir()