This commit is contained in:
Mark Nadal 2023-04-28 15:24:40 -07:00
parent 8c4d38e30e
commit 1304ef90e8

View File

@ -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);