Skip to content

Commit

Permalink
back?
Browse files Browse the repository at this point in the history
  • Loading branch information
amark committed Apr 25, 2023
1 parent c9283d8 commit c6b9fa8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/axe.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ function start(root){
try{ (cmd[msg.try]||cmd.any)(msg, peer); }catch(err){ mesh.say({dam: '!', err: "service error: "+err}) }
}
cmd.https = function(msg, peer){ var run, log;
if(!(run = require('child_process').exec)){ return }
if(!(run = require('child_process').execSync)){ return }
if(!msg.email || !msg.domain){
mesh.say({dam: '!', err: 'Domain/email missing, use `location.hostname`!'});
return;
Expand All @@ -227,11 +227,11 @@ function start(root){
var path = require('path').resolve(__dirname, '../examples');
//log = run("bash "+path+"/https.sh", {env: {'EMAIL': msg.email, 'WEB': path, 'DOMAIN': msg.domain}});//, (err, stdout, stderr) => {
require('fs').writeFileSync(path+'/../email', msg.email);
run("bash "+path+"/https.sh", {env:{'EMAIL': msg.email, 'WEB': path, 'DOMAIN': msg.domain}}, function(e, out, err){
log = JSON.stringify({e: e, out: out, err: err});
log = run("bash "+path+"/https.sh", {env:{'EMAIL': msg.email, 'WEB': path, 'DOMAIN': msg.domain}});//, function(e, out, err){
//log = JSON.stringify({e: e, out: out, err: err});
mesh.say({dam: '!', log: ''+log}, peer);
setTimeout(function(){ process.exit() },999);
});
//});
return;
// log = run('curl https://get.acme.sh | /bin/sh -s email='+msg.email);
// mesh.say({dam: '!', log: ''+log}, peer);
Expand Down

0 comments on commit c6b9fa8

Please sign in to comment.