genieacs: fix with diagnosticos

Signed-off-by: Rodrigo Bertoldo de Sousa Martins <rodrigo.sousa.577@gmail.com>
This commit is contained in:
rodrigo committed 2026-04-01 14:54:31 -03:00
1 parent 63591000f0
commit b6e898c885
3 files changed
+102 -2

No files matched your search

+14
View File
@@ -1070,6 +1070,20 @@ Digite /help para ver todos os comandos disponíveis!
: Promise.resolve({ success: false, skipped: true })
]);
// Sincronização TAG GenieACS ↔ PPPoE TopSapp (fire-and-forget, silencioso)
// Garante que o login PPPoE do cliente fica registrado como TAG no GenieACS,
// permitindo buscas futuras por "ver roteador <login>".
if (serial && pppoeLogin && this.genieacs.isReady()) {
this.genieacs.sincronizarTagPPPoE(serial, pppoeLogin)
.then(r => {
if (r.success && !r.already) {
logger.info(`[GenieACS] TAG "${r.tag}" sincronizada em ${r.deviceId}`);
console.log(`🏷️ [GenieACS] TAG "${r.tag}" adicionada ao device ${r.deviceId}`);
}
})
.catch(e => logger.warn(`[GenieACS] Falha ao sincronizar TAG: ${e.message}`));
}
// Montar relatório
let msg = `🩺 *Diagnóstico do Cliente*\n`;
msg += `━━━━━━━━━━━━━━━━━━━━━\n\n`;