Update index.py

This commit is contained in:
2026-11-04 10:11:02 +08:00
parent 2d80df003e
commit c1380945ef

View File

@@ -254,13 +254,19 @@ def initDreplace(version=''):
return file_bin
def status(version=''):
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}'")
if data[0] == '':
return 'stop'
return 'start'
def status(version=''):
pid = getServerDir() + "/data/postmaster.pid"
if os.path.exists(pid):
return 'start'
return 'stop'
def pgCmd(cmd):
return "su - postgres -c \"" + cmd + "\""