diff --git a/lxc.js b/lxc.js index a54a942..50de262 100644 --- a/lxc.js +++ b/lxc.js @@ -2,7 +2,8 @@ var exec = require('child_process').exec; function sysExec(command, callback){ - command = 'unset XDG_SESSION_ID XDG_RUNTIME_DIR; cgm movepid all virt $$; ' + command; + command = 'ssh virt@104.236.77.157 ' + command; + // command = 'unset XDG_SESSION_ID XDG_RUNTIME_DIR; cgm movepid all virt $$; ' + command; return exec(command, (function(callback){ return function(err,data,stderr){ diff --git a/routes/api.js b/routes/api.js index 5b3491e..f3e1cc2 100644 --- a/routes/api.js +++ b/routes/api.js @@ -47,6 +47,7 @@ var lxcTimeout = function(ip, time){ } timeoutEvents[name] = setTimeout(function(){ lxc.stop(name); + startAll(); }, time); }