runner
This commit is contained in:
parent
48b4dd5453
commit
d136e97fa5
@ -92,9 +92,19 @@ router.get('/list', function(req, res, next) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
router.post('/run/:ip?', function(req, res, next){
|
router.post('/run/:ip?', function doRun(req, res, next){
|
||||||
if(req.params.ip){
|
// check if server is
|
||||||
|
|
||||||
|
lxc.list(function(data){
|
||||||
var ip = '10.0.'+ req.params.ip;
|
var ip = '10.0.'+ req.params.ip;
|
||||||
|
data.forEach(function(idx, element){
|
||||||
|
if(element.ipv4 === ip){
|
||||||
|
runner(req, res, ip)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
if(req.params.ip){
|
||||||
return runner(res, req, ip);
|
return runner(res, req, ip);
|
||||||
}else{
|
}else{
|
||||||
var name = 'u1-'+(Math.random()*100).toString().replace('.','');
|
var name = 'u1-'+(Math.random()*100).toString().replace('.','');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user