This commit is contained in:
midoks
2019-02-21 23:05:09 +08:00
parent d97d1c5c60
commit 6cc3ce7f05
7 changed files with 45 additions and 1 deletions
+11
View File
@@ -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')
+4
View File
@@ -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):
+1
View File
@@ -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