mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
update
This commit is contained in:
@@ -16,13 +16,24 @@ from random import Random
|
||||
import public
|
||||
import db
|
||||
|
||||
from flask import redirect
|
||||
|
||||
|
||||
def init():
|
||||
|
||||
checkClose()
|
||||
|
||||
initDB()
|
||||
initInitD()
|
||||
initUserInfo()
|
||||
|
||||
|
||||
# 检查面板是否关闭
|
||||
def checkClose():
|
||||
if os.path.exists('data/close.pl'):
|
||||
return redirect('/close')
|
||||
|
||||
|
||||
def initDB():
|
||||
try:
|
||||
sql = db.Sql().dbfile('default')
|
||||
|
||||
@@ -144,6 +144,10 @@ class config_api:
|
||||
public.execShell("chown root.root " + filename)
|
||||
return public.returnJson(True, '面板已关闭!')
|
||||
|
||||
def getApi(self):
|
||||
data = {}
|
||||
|
||||
return public.getJson(data)
|
||||
##### ----- end ----- ###
|
||||
|
||||
def getVersion(self):
|
||||
|
||||
@@ -683,6 +683,7 @@ class plugins_api:
|
||||
if not os.path.exists(path):
|
||||
return ('', '')
|
||||
data = public.execShell(py_cmd)
|
||||
# data = os.popen(py_cmd).read()
|
||||
|
||||
if public.isAppleSystem():
|
||||
print py_cmd
|
||||
|
||||
Reference in New Issue
Block a user