mb-service-linux 2.0.0 → 2.0.1-dev-20260701-117d561

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/CHANGELOG.md CHANGED
@@ -24,7 +24,16 @@ If you like this project and find it useful, please consider giving it a star on
24
24
 
25
25
  <a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/assets/bmc-button.svg" alt="Buy me a coffee" width="120"></a>
26
26
 
27
- ## [2.0.0] - Dev branch
27
+ ## [2.0.1] - Dev branch
28
+
29
+ ### Added
30
+
31
+ - [service]: Add path of service file.
32
+ - [service]: Add Environment PATH to the service file.
33
+
34
+ <a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/assets/bmc-button.svg" alt="Buy me a coffee" width="80"></a>
35
+
36
+ ## [2.0.0] - 2026-07-01
28
37
 
29
38
  ### Added
30
39
 
package/README.md CHANGED
@@ -55,8 +55,16 @@ See the complete guidelines on [Matterbridge](https://matterbridge.io) for more
55
55
 
56
56
  ## How to install the Matterbridge service cli
57
57
 
58
+ Install it with Node.js:
59
+
60
+ ```bash
61
+ sudo npm install mb-service-linux --global --omit=dev
62
+ ```
63
+
64
+ Or install it with Bun:
65
+
58
66
  ```bash
59
- sudo npm install -g mb-service-linux --omit=dev
67
+ bun add mb-service-linux --global --omit=dev
60
68
  ```
61
69
 
62
70
  Create a root-owned service file when Matterbridge is installed globally with npm:
@@ -67,7 +75,7 @@ sudo mb-service enable
67
75
  sudo mb-service start
68
76
  ```
69
77
 
70
- Create a user-owned service file when Matterbridge is installed for the current user:
78
+ Create a user-owned service file when Matterbridge is installed for the current user with npm:
71
79
 
72
80
  ```bash
73
81
  mb-service create
package/bin/mb-service CHANGED
File without changes
package/dist/module.js CHANGED
@@ -163,8 +163,8 @@ function printHelp() {
163
163
  ` Bun version: ${process.versions.bun ?? 'not running'}\n` +
164
164
  ` Running as root: ${isRoot() ? 'yes' : 'no'}\n` +
165
165
  ` Service user: ${getDiagnosticUser()}\n` +
166
- ` Root service file: ${existsServiceFile(true) ? 'found' : 'not found'}\n` +
167
- ` User service file: ${existsServiceFile(false) ? 'found' : 'not found'}\x1b[0m`);
166
+ ` Root service file: ${existsServiceFile(true) ? `found at "${getServicePath(true)}"` : 'not found'}\n` +
167
+ ` User service file: ${existsServiceFile(false) ? `found at "${getServicePath(false)}"` : 'not found'}\x1b[0m`);
168
168
  console.log(`Usage: mb-service [start|stop|restart|logs|status]\n\n` +
169
169
  ` Please provide a command:\n` +
170
170
  ` start start the matterbridge service\n` +
@@ -190,13 +190,19 @@ function createServiceConfig(root) {
190
190
  `Wants=network.target\n` +
191
191
  `StartLimitIntervalSec=60\n` +
192
192
  `StartLimitBurst=5\n` +
193
+ `\n` +
193
194
  `[Service]\n` +
194
195
  `Type=simple\n` +
196
+ `# PATH for any child process Matterbridge/plugins spawn (bun/node/npm lookups).\n` +
197
+ `Environment="PATH=/usr/local/bin:/usr/bin:/bin"\n` +
195
198
  `ExecStart=matterbridge --service\n` +
196
199
  `WorkingDirectory=%h\n` +
200
+ `# Logs go to the journal (should be persistent). Read with: journalctl -u matterbridge -n 1000 -f --output cat\n` +
197
201
  `StandardOutput=inherit\n` +
198
202
  `StandardError=inherit\n` +
199
203
  `Restart=always\n` +
204
+ `RestartSec=5\n` +
205
+ `TimeoutStopSec=60\n` +
200
206
  `User=${user}\n` +
201
207
  `Group=${user}\n` +
202
208
  `\n` +
@@ -208,13 +214,22 @@ function createServiceConfig(root) {
208
214
  `Wants=network.target\n` +
209
215
  `StartLimitIntervalSec=60\n` +
210
216
  `StartLimitBurst=5\n` +
217
+ `\n` +
211
218
  `[Service]\n` +
212
219
  `Type=simple\n` +
220
+ `# PATH for any child process Matterbridge/plugins spawn (bun/node/npm lookups).\n` +
221
+ (isBun() ? `Environment="PATH=%h/.bun/bin:/usr/local/bin:/usr/bin:/bin"\n` : `Environment="PATH=/usr/local/bin:/usr/bin:/bin"\n`) +
222
+ `# Absolute paths — systemd has no shell PATH. %h = the user's home.\n` +
223
+ `# --bun forces the Bun runtime even though the matterbridge bin has a node shebang,\n` +
224
+ `# and shims any \`node\` the process spawns to Bun as well.\n` +
213
225
  (isBun() ? `ExecStart=%h/.bun/bin/bun --bun run %h/.bun/bin/matterbridge --service\n` : `ExecStart=matterbridge --service\n`) +
214
226
  `WorkingDirectory=%h\n` +
227
+ `# Logs go to the journal (should be persistent). Read with: journalctl --user -u matterbridge -n 1000 -f --output cat\n` +
215
228
  `StandardOutput=inherit\n` +
216
229
  `StandardError=inherit\n` +
217
230
  `Restart=always\n` +
231
+ `RestartSec=5\n` +
232
+ `TimeoutStopSec=60\n` +
218
233
  `\n` +
219
234
  `[Install]\n` +
220
235
  `WantedBy=default.target\n`;
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "mb-service-linux",
3
- "version": "2.0.0",
3
+ "version": "2.0.1-dev-20260701-117d561",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "mb-service-linux",
9
- "version": "2.0.0",
9
+ "version": "2.0.1-dev-20260701-117d561",
10
10
  "license": "Apache-2.0",
11
11
  "bin": {
12
12
  "mb-service": "bin/mb-service"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mb-service-linux",
3
- "version": "2.0.0",
3
+ "version": "2.0.1-dev-20260701-117d561",
4
4
  "description": "Matterbridge service command line interface",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "Apache-2.0",