processes() improved parsing of all services (linux)
This commit is contained in:
+2
-2
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user