From 1eaf7d907be914a84d567a28308b50bf439e38c1 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 29 Jan 2023 20:34:50 +0100 Subject: [PATCH] processes() improved parsing of all services (linux) --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 6 +++--- lib/processes.js | 4 ++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 366df25..b4b9f72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -82,6 +82,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.17.5 | 2023-01-29 | `processes()` improved parsing of all services (linux) | | 5.17.4 | 2023-01-24 | `networkInterfaces()` sanitizing networkInterfaces device names | | 5.17.3 | 2023-01-10 | `processes()` fix elapsed time parsing (linux) | | 5.17.2 | 2023-01-10 | `utils` fix killing powershell (windows) | diff --git a/docs/history.html b/docs/history.html index 06ac25e..fad1041 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@ + + 5.17.5 + 2023-01-29 + processes() improved parsing of all services (linux) + 5.17.4 2023-01-24 diff --git a/docs/index.html b/docs/index.html index cd2e243..d48b059 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.17.4
+
New Version: 5.17.5
@@ -204,7 +204,7 @@
-
15,452
+
15,483
Lines of code
@@ -212,7 +212,7 @@
Downloads last month
-
588
+
590
Dependents
diff --git a/lib/processes.js b/lib/processes.js index 670ca21..38aea7c 100644 --- a/lib/processes.js +++ b/lib/processes.js @@ -151,11 +151,11 @@ function services(srv, callback) { if (_linux || _freebsd || _openbsd || _netbsd || _darwin) { if ((_linux || _freebsd || _openbsd || _netbsd) && srvString === '*') { try { - const tmpsrv = execSync('systemctl --type=service --no-legend 2> /dev/null').toString().split('\n'); + const tmpsrv = execSync('systemctl --all --type=service --no-legend 2> /dev/null').toString().split('\n'); srvs = []; for (const s of tmpsrv) { const name = s.split('.service')[0]; - if (name) { + if (name && s.indexOf(' not-found ') === -1) { srvs.push(name.trim()); } }