diff --git a/lib/service.js b/lib/service.js index 1e964012..7f479c34 100644 --- a/lib/service.js +++ b/lib/service.js @@ -26,7 +26,7 @@ module.exports = function(root){ cmd.update = function(msg, peer){ var log, pass; try{ pass = (''+fs.readFileSync(home+'/pass')).trim() }catch(e){} if(!pass || (msg.pass||'').trim() != pass){ return } - fs.writeFile(examp+'/../updated', +new Date+'', function(){}); + root.stats.stay.updated = +new Date; run("bash "+examp+"/install.sh", {env: {VERSION: msg.version||''}}, function(e, out, err){ log = e+"|"+out+"|"+err; mesh.say({dam: '!', log: ''+log}, peer);