mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
update
This commit is contained in:
@@ -175,6 +175,16 @@ def delPort():
|
||||
return True
|
||||
|
||||
|
||||
def cleanNginxLog():
|
||||
log_a = accessLog()
|
||||
log_e = errorLog()
|
||||
|
||||
for i in [log_a, log_e]:
|
||||
if os.path.exists(i):
|
||||
cmd = "echo '' > " + i
|
||||
mw.execShell(cmd)
|
||||
|
||||
|
||||
def initReplace():
|
||||
|
||||
pma_dir = getServerDir() + "/pgadmin"
|
||||
@@ -213,20 +223,14 @@ def initReplace():
|
||||
mw.writeFile(systemService, content)
|
||||
mw.execShell('systemctl daemon-reload')
|
||||
|
||||
|
||||
def start():
|
||||
initCfg()
|
||||
openPort()
|
||||
|
||||
initReplace()
|
||||
|
||||
log_a = accessLog()
|
||||
log_e = errorLog()
|
||||
|
||||
for i in [log_a, log_e]:
|
||||
if os.path.exists(i):
|
||||
cmd = "echo '' > " + i
|
||||
mw.execShell(cmd)
|
||||
|
||||
|
||||
cleanNginxLog()
|
||||
mw.restartWeb()
|
||||
return 'ok'
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ Description=pgadmin service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=gunicorn --bind unix:/tmp/pgadmin4.sock --workers=1 --threads=25 --chdir {$SERVER_PATH}/lib/python3.10/dist-packages/pgadmin4 pgAdmin4:app
|
||||
ExecStart=gunicorn --bind unix:/tmp/pgadmin4.sock --workers=1 --threads=25 --chdir {$SERVER_PATH}/pgadmin/lib/python3.10/dist-packages/pgadmin4 pgAdmin4:app
|
||||
ExecReload=/bin/kill -USR2 $MAINPID
|
||||
PrivateTmp=false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user