pull/109/head
Mr Chen 7 years ago
parent 86fca0c6f5
commit 479206d83c
  1. BIN
      data/default.db
  2. 11
      plugins/csvn/info.json
  3. 4
      restart.sh
  4. 9
      route/plugins.py
  5. 4
      start.sh
  6. 7
      stop.sh
  7. 43
      task.py
  8. 2
      templates/default/crontab.html

Binary file not shown.

@ -1,17 +1,20 @@
{ {
"sort": 7, "sort": 7,
"ps": "流行SVN代码共享管理软件", "ps": "最流行的SVN代码共享管理软件",
"shell": "php.sh", "install": "install.sh",
"uninstall": "uninstall.sh",
"name": "csvn", "name": "csvn",
"title": "CSVN", "title": "CSVN",
"default": false, "default": false,
"versions": "5.2", "versions":[
{"status":false,"version":"1.0"}
],
"tip": "soft", "tip": "soft",
"checks": "/www/server/php/VERSION/bin/php", "checks": "/www/server/php/VERSION/bin/php",
"display": 1, "display": 1,
"author": "Zend", "author": "Zend",
"date": "2017-04-01", "date": "2017-04-01",
"home": "https://www.php.net", "home": "https://www.collab.net",
"type": "语言解释器", "type": "语言解释器",
"pid": "3" "pid": "3"
} }

@ -0,0 +1,4 @@
#!/bin/sh
./stop.sh
./start.sh

@ -93,15 +93,14 @@ def install():
pluginInfo = json.loads(public.readFile(infoJsonPos)) pluginInfo = json.loads(public.readFile(infoJsonPos))
print name execstr = "cd /www/server/mdserver-web/plugins/" + \
name + " && /bin/bash " + pluginInfo["install"]
taskAdd = (None, mmsg + '[' + name + '-' + "1" + ']', taskAdd = (None, mmsg + '[' + name + '-' + "1" + ']',
'execshell', '0', time.strftime('%Y-%m-%d %H:%M:%S'), '1') 'execshell', '0', time.strftime('%Y-%m-%d %H:%M:%S'), execstr)
print taskAdd
public.M('tasks').add('id,name,type,status,addtime, execstr', taskAdd) public.M('tasks').add('id,name,type,status,addtime, execstr', taskAdd)
sh = __plugin_name + '/' + name + '/' + pluginInfo['shell']
# os.system('/bin/bash ' + sh + ' install')
return public.retJson(True, '已将安装任务添加到队列!') return public.retJson(True, '已将安装任务添加到队列!')

@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh
gunicorn -b 127.0.0.1:7200 app:app gunicorn -b 127.0.0.1:7200 app:app &
python task.py &
#open "http://127.0.0.1:7200" #open "http://127.0.0.1:7200"

@ -0,0 +1,7 @@
#!/bin/sh
ps -ef|grep app:app |grep -v grep|awk '{print $2}'|xargs kill -9
ps -ef|grep task.py |grep -v grep|awk '{print $2}'|xargs kill -9
#open "http://127.0.0.1:7200"

@ -499,27 +499,28 @@ def btkill():
b.start() b.start()
if __name__ == "__main__": if __name__ == "__main__":
os.system('rm -rf /www/server/phpinfo/*') # os.system('rm -rf /www/server/phpinfo/*')
if os.path.exists('/www/server/nginx/sbin/nginx'): # if os.path.exists('/www/server/nginx/sbin/nginx'):
pfile = '/www/server/nginx/conf/enable-php-72.conf' # pfile = '/www/server/nginx/conf/enable-php-72.conf'
if not os.path.exists(pfile): # if not os.path.exists(pfile):
pconf = '''location ~ [^/]\.php(/|$) # pconf = '''location ~ [^/]\.php(/|$)
{ # {
try_files $uri =404; # try_files $uri =404;
fastcgi_pass unix:/tmp/php-cgi-72.sock; # fastcgi_pass unix:/tmp/php-cgi-72.sock;
fastcgi_index index.php; # fastcgi_index index.php;
include fastcgi.conf; # include fastcgi.conf;
include pathinfo.conf; # include pathinfo.conf;
}''' # }'''
public.writeFile(pfile, pconf) # public.writeFile(pfile, pconf)
import threading
t = threading.Thread(target=systemTask) # import threading
t.setDaemon(True) # t = threading.Thread(target=systemTask)
t.start() # t.setDaemon(True)
# t.start()
p = threading.Thread(target=check502Task)
p.setDaemon(True) # p = threading.Thread(target=check502Task)
p.start() # p.setDaemon(True)
# p.start()
#p = threading.Thread(target=btkill) #p = threading.Thread(target=btkill)
# p.setDaemon(True) # p.setDaemon(True)

@ -155,7 +155,7 @@
<th>状态</th> <th>状态</th>
<th>周期</th> <th>周期</th>
<th>执行时机</th> <th>执行时机</th>
<th width="190">保存数量</th> <th width="190">保存数量</th>
</tr> </tr>
</thead> </thead>
<tbody id="cronbody"> <tbody id="cronbody">

Loading…
Cancel
Save