mirror of
https://github.com/midoks/mdserver-web
synced 2026-11-04 19:16:00 +08:00
Update index.py
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user