@irsyadulibad/servermon 1.2.3 → 1.2.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@irsyadulibad/servermon",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "Lightweight server monitoring daemon — collects system metrics and sends structured reports to Telegram. Built with Bun + TypeScript.",
5
5
  "module": "index.ts",
6
6
  "type": "module",
@@ -72,6 +72,9 @@ async function cmdInstall(): Promise<void> {
72
72
  process.exit(1);
73
73
  }
74
74
 
75
+ // Use bun directly as interpreter so systemd doesn't need bun in PATH
76
+ const execStart = `${bunPath} ${servermonPath} start`;
77
+
75
78
  console.log(`🔍 bun: ${bunPath}`);
76
79
  console.log(`🔍 servermon: ${servermonPath}`);
77
80
  console.log(`📁 Config: ${configPath()}`);
@@ -79,7 +82,7 @@ async function cmdInstall(): Promise<void> {
79
82
 
80
83
  await ensureSystemdDir();
81
84
 
82
- const serviceContent = `[Unit]\nDescription=Server Monitor — Telegram system health reports\nAfter=network-online.target\nWants=network-online.target\n\n[Service]\nType=simple\nExecStart=${servermonPath} start\nRestart=always\nRestartSec=30\nEnvironment=NODE_ENV=production\n\n[Install]\nWantedBy=default.target\n`;
85
+ const serviceContent = `[Unit]\nDescription=Server Monitor — Telegram system health reports\nAfter=network-online.target\nWants=network-online.target\n\n[Service]\nType=simple\nExecStart=${execStart}\nRestart=always\nRestartSec=30\nEnvironment=NODE_ENV=production\n\n[Install]\nWantedBy=default.target\n`;
83
86
 
84
87
  await Bun.write(SERVICE_PATH, serviceContent);
85
88
  console.log(`📄 Written: ${SERVICE_PATH}`);