mirror of
https://github.com/midoks/mdserver-web
synced 2026-11-04 19:16:00 +08:00
Compare commits
2 Commits
2d80df003e
...
84b94a172e
| Author | SHA1 | Date | |
|---|---|---|---|
| 84b94a172e | |||
| c1380945ef |
@@ -253,23 +253,25 @@ def initDreplace(version=''):
|
||||
mw.execShell('chmod +x ' + file_bin)
|
||||
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 + "\""
|
||||
|
||||
|
||||
def execShellPg(cmd):
|
||||
return mw.execShell(pgCmd(cmd))
|
||||
|
||||
|
||||
def pGetDbUser():
|
||||
if mw.isAppleSystem():
|
||||
user = mw.execShell(
|
||||
@@ -277,7 +279,6 @@ def pGetDbUser():
|
||||
return user
|
||||
return 'postgresql'
|
||||
|
||||
|
||||
def initPgData():
|
||||
serverdir = getServerDir()
|
||||
if not os.path.exists(serverdir + '/data'):
|
||||
@@ -289,7 +290,6 @@ def initPgData():
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def initPgPwd():
|
||||
|
||||
serverdir = getServerDir()
|
||||
|
||||
Reference in New Issue
Block a user