From 70bd796bc63c22b29cc421fd4834d80eb52c449a Mon Sep 17 00:00:00 2001 From: william Date: Sat, 30 Apr 2016 23:08:13 -0400 Subject: [PATCH] ssh --- lxc.js | 3 ++- routes/api.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) 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); }