mirror of
https://gitlab.com/futo-org/fcast.git
synced 2025-06-24 21:25:23 +00:00
Fix hostname query on non-systemd distributions
This commit is contained in:
parent
4524a0ee6a
commit
be93dcf03d
1 changed files with 1 additions and 2 deletions
|
@ -13,8 +13,7 @@ export class DiscoveryService {
|
|||
case "darwin":
|
||||
return cp.execSync("scutil --get ComputerName").toString().trim();
|
||||
case "linux":
|
||||
const prettyname = cp.execSync("hostnamectl --pretty").toString().trim();
|
||||
return prettyname === "" ? os.hostname() : prettyname;
|
||||
return os.hostname();
|
||||
default:
|
||||
return os.hostname();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue