@decentnetwork/lan 0.1.54 → 0.1.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1306,7 +1306,7 @@ export async function cmdDoctor(args) {
1306
1306
  const pid = daemonPid(config);
1307
1307
  if (pid === null) {
1308
1308
  bad("Daemon is not running", `start it: sudo agentnet up --real-tun --config-dir ${dir}`);
1309
- info("Logs go to /var/log/agentnet.log (NOT journalctl) when run as a service.");
1309
+ info("As a service: logs are in `journalctl -u agentnet -f` (older installs: /var/log/agentnet.log).");
1310
1310
  return;
1311
1311
  }
1312
1312
  ok(`Daemon running (pid ${pid})`);
@@ -1345,7 +1345,7 @@ export async function cmdDoctor(args) {
1345
1345
  ok(`${nameOf(f)} — connected`);
1346
1346
  for (const f of connecting)
1347
1347
  info(`${nameOf(f)} — connecting (other end offline, or upgraded-but-not-restarted: restart its daemon)`);
1348
- console.log("\n Watch live: sudo tail -f /var/log/agentnet.log (\"Peers:\" line every 30s)");
1348
+ console.log("\n Watch live: journalctl -u agentnet -f (\"Peers:\" line every 30s; older installs: /var/log/agentnet.log)");
1349
1349
  }
1350
1350
  /**
1351
1351
  * Enable dora integration. Accepts either `--address` (preferred — the
@@ -1612,8 +1612,12 @@ User=root
1612
1612
  ExecStart=${agentnetBin} up --real-tun --config-dir ${dir}
1613
1613
  Restart=on-failure
1614
1614
  RestartSec=5
1615
- StandardOutput=append:/var/log/agentnet.log
1616
- StandardError=append:/var/log/agentnet.log
1615
+ # Log to the journal so the intuitive 'journalctl -u agentnet -f' just works.
1616
+ # (The old 'append:/var/log/agentnet.log' redirect sent output to a file and
1617
+ # left journalctl empty — the #1 "why no logs?" confusion.)
1618
+ StandardOutput=journal
1619
+ StandardError=journal
1620
+ SyslogIdentifier=agentnet
1617
1621
 
1618
1622
  [Install]
1619
1623
  WantedBy=multi-user.target
@@ -1629,7 +1633,7 @@ WantedBy=multi-user.target
1629
1633
  execSync("systemctl daemon-reload");
1630
1634
  execSync("systemctl enable --now agentnet");
1631
1635
  console.log(`Installed ${unitPath} and started agentnet.service.`);
1632
- console.log(`Logs: journalctl -u agentnet -f (or /var/log/agentnet.log)`);
1636
+ console.log(`Logs: journalctl -u agentnet -f`);
1633
1637
  return;
1634
1638
  }
1635
1639
  if (process.platform === "darwin") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decentnetwork/lan",
3
- "version": "0.1.54",
3
+ "version": "0.1.55",
4
4
  "description": "Private virtual LAN for self-hosted services and AI agents, built on Elastos Carrier. NAT-traversal, name service, ACL, all over a peer-to-peer mesh — no public IP required.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",