systeminformation
Advanced tools
Comparing version 5.17.16 to 5.17.17
@@ -171,11 +171,17 @@ 'use strict'; | ||
try { | ||
const stdout = execSync('hostname -f'); | ||
fqdn = stdout.toString().split(os.EOL)[0]; | ||
const stdout = execSync('hostnamectl --json short 2>/dev/null'); | ||
const json = JSON.parse(stdout.toString()); | ||
fqdn = json['StaticHostname']; | ||
} catch (e) { | ||
util.noop(); | ||
try { | ||
const stdout = execSync('hostname -f 2>/dev/null'); | ||
fqdn = stdout.toString().split(os.EOL)[0]; | ||
} catch (e) { | ||
util.noop(); | ||
} | ||
} | ||
} | ||
if (_freebsd || _openbsd || _netbsd) { | ||
} if (_freebsd || _openbsd || _netbsd) { | ||
try { | ||
const stdout = execSync('hostname'); | ||
const stdout = execSync('hostname 2>/dev/null'); | ||
fqdn = stdout.toString().split(os.EOL)[0]; | ||
@@ -182,0 +188,0 @@ } catch (e) { |
{ | ||
"name": "systeminformation", | ||
"version": "5.17.16", | ||
"version": "5.17.17", | ||
"description": "Advanced, lightweight system and OS information library", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
727213
15364