Add connection journal with service traffic details and interactive offline station map

This commit is contained in:
alberto committed 2026-10-15 23:17:44 +02:00
1 parent 78839f5bb4
commit 106b04d631
14 files changed
+168 -7

No files matched your search

+1 -1
View File
@@ -14,7 +14,7 @@ if(radioPort&&!detected.radioPorts.some(p=>p.id===radioPort))throw new Error('Po
const sysopUser=arg('sysop-user')||previous.sysopUser||detected.users[0].user;
if(!detected.users.some(u=>u.user===sysopUser))throw new Error('Utente sysop non rilevato');
let peers=[];try{const mail=await readFile(path.join(root,'BPQMailChat','BPQMail.cfg'),'utf8');const forward=mail.split(/BBSForwarding\s*:/i)[1]?.split(/BBSUsers\s*:/i)[0]||'';peers=[...forward.matchAll(/^\s{2}([A-Z0-9-]+)\s*:/gm)].map(m=>m[1]);}catch{}
const config={nodeExe:process.execPath,bpqRoot:root,httpPort,port,radioPort,sysopUser,forwardPeer:arg('forward-peer')||previous.forwardPeer||'',cmsPeer:'RMS',varaSyslogPort:18514};
const config={nodeExe:process.execPath,bpqRoot:root,httpPort,port,radioPort,sysopUser,forwardPeer:arg('forward-peer')||previous.forwardPeer||'',cmsPeer:'RMS',varaSyslogPort:18514,varaLogPath:arg('vara-log')||previous.varaLogPath||null};
if(config.forwardPeer&&!peers.includes(config.forwardPeer))throw new Error('Profilo forwarding selezionato non rilevato');
console.log(JSON.stringify({bpq:'in esecuzione, HTTP verificato',nodeCall:detected.nodeCall,ports:detected.ports,services:detected.apps.map(a=>a.command),forwardProfiles:peers,selectedRadio:radioPort,sysopUser},null,2));
if(!args.includes('--check-only')){await writeFile(path.join(dir,'console.config.json'),JSON.stringify(config,null,2)+'\n');console.log('Configurazione salvata senza password.');}