update
This commit is contained in:
parent
2ee2440c68
commit
c85152e85a
3
app.py
3
app.py
|
|
@ -4,6 +4,9 @@ import sys
|
|||
import io
|
||||
import os
|
||||
|
||||
reload(sys)
|
||||
sys.setdefaultencoding('utf8')
|
||||
|
||||
import route
|
||||
from flask import Flask
|
||||
from datetime import timedelta
|
||||
|
|
|
|||
BIN
data/default.db
BIN
data/default.db
Binary file not shown.
|
|
@ -76,6 +76,11 @@ def install():
|
|||
rundir = public.getRunDir()
|
||||
name = request.form.get('name', '')
|
||||
|
||||
mmsg = '安装'
|
||||
if hasattr(request.form, 'upgrade'):
|
||||
mtype = 'update'
|
||||
mmsg = 'upgrade'
|
||||
|
||||
if name.strip() == '':
|
||||
return public.retJson(-1, "缺少name数据!", ())
|
||||
|
||||
|
|
@ -86,8 +91,15 @@ def install():
|
|||
|
||||
pluginInfo = json.loads(public.readFile(infoJsonPos))
|
||||
|
||||
sh = __plugin_name + '/' + name + '/' + pluginInfo['shell']
|
||||
os.system('/bin/bash ' + sh + ' install')
|
||||
print name
|
||||
taskAdd = (None, mmsg + '[' + name + '-' + "1" + ']',
|
||||
'execshell', '0', time.strftime('%Y-%m-%d %H:%M:%S'), '1')
|
||||
|
||||
print taskAdd
|
||||
public.M('tasks').add('id,name,type,status,addtime, execstr', taskAdd)
|
||||
|
||||
# sh = __plugin_name + '/' + name + '/' + pluginInfo['shell']
|
||||
# os.system('/bin/bash ' + sh + ' install')
|
||||
print request.args
|
||||
return ''
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="renderer" content="webkit">
|
||||
<title>MDWEB-Linux面板</title>
|
||||
<title>mdserver-web|linux面板</title>
|
||||
<link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon" />
|
||||
<link href="/static/bootstrap-3.3.5/css/bootstrap.min.css?v={{config.version}}" rel="stylesheet">
|
||||
<link href="/static/css/site.css?v={{config.version}}" rel="stylesheet">
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
<script src="/static/js/clipboard.min.js?v={{config.version}}"></script>
|
||||
<script src="/static/js/public.js?v={{config.version}}"></script>
|
||||
{% block content %}{% endblock %}
|
||||
<div class="footer bgw">mdweb ©2014-2018 面板 (github.com/midoks/mdweb)<a style="margin-left:20px;color:#20a53a;" href="//github.com/midoks/mdweb" target="_blank">HELP</a><a style="margin-left:20px;color:#20a53a;" href="//github.com/midoks/mdweb" target="_blank">《使用手册》</a></div>
|
||||
<div class="footer bgw">mdserver-web ©2014-2018 面板 (github.com/midoks/mdserver-web)<a style="margin-left:20px;color:#20a53a;" href="//github.com/midoks/mdserver-web" target="_blank">help</a><a style="margin-left:20px;color:#20a53a;" href="//github.com/midoks/mdserver-web" target="_blank">《使用手册》</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
index
|
||||
Loading…
Reference in New Issue