mirror of https://github.com/jumpserver/jumpserver
修改一些bug
parent
a4e6fef2a6
commit
a7904a8d57
|
@ -290,7 +290,11 @@ def downKey(request):
|
|||
username = request.GET.get('username')
|
||||
|
||||
filename = '%s/%s' % (rsa_dir, username)
|
||||
f = open(filename)
|
||||
try:
|
||||
f = open(filename)
|
||||
except IOError:
|
||||
error = u'密钥文件不存在'
|
||||
return render_to_response('info.html', {'error': error})
|
||||
data = f.read()
|
||||
f.close()
|
||||
response = HttpResponse(data, content_type='application/octet-stream')
|
||||
|
@ -1120,7 +1124,7 @@ def killSession(request):
|
|||
if pid:
|
||||
pid = pid[0]
|
||||
os.kill(pid.cpid, 9)
|
||||
return HttpResponse('ok')
|
||||
return render_to_response('info.html', {'msg': u'结束会话成功,返回中.'})
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ def log_hanler(logid):
|
|||
ret2 = os.system('cat %s | grep "\[.*@.*\][\$\#]" >> %s.his' % (filename, filename))
|
||||
ret3 = os.system('cat %s | grep "EndTime" >> %s.his' % (filename, filename))
|
||||
if (ret1 + ret2 + ret3) == 0:
|
||||
print 'Handler % ok.' % filename
|
||||
print 'Handler %s ok.' % filename
|
||||
|
||||
|
||||
def set_finish(id):
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
./manage.py runserver 0.0.0.0:80
|
||||
./manage.py runserver 0.0.0.0:80 &> access.log &
|
||||
./log_handler.py &> handler.log &
|
||||
|
|
Loading…
Reference in New Issue